(x, y, z)
| 5 | import sys |
| 6 | |
| 7 | def catAndMouse(x, y, z): |
| 8 | if(abs(z-x)==abs(z-y)): # checking whether both the cats reach at the same time or not |
| 9 | return "Mouse C" # if yes, returns Mouse C |
| 10 | elif(abs(z-x)>abs(z-y)): # checking if the cat B reaches earlier or Cat A |
| 11 | return "Cat B" |
| 12 | else: |
| 13 | return "Cat A" |
| 14 | |
| 15 | if __name__ == '__main__': |
| 16 | fptr = open(os.environ['OUTPUT_PATH'], 'w') |