You are viewing a single comment's thread. Return to all comments →
My python:
#!/bin/python3 import sys x1,v1,x2,v2 = input().strip().split(' ') x1,v1,x2,v2 = [int(x1),int(v1),int(x2),int(v2)] if x1 == x2: print('YES') try: quotient, remainder = divmod(x2-x1, v1-v2) except ZeroDivisionError: print('NO') else: if quotient > 0 and remainder == 0: print('YES') else: print('NO')
Number Line Jumps
You are viewing a single comment's thread. Return to all comments →
My python: