mdgaziur001

Untitled

Dec 18th, 2019
162
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def jo(s):return '.'.join(s)
  2. a,b=map(str,input().split())
  3. a,b=a.split('.'),b.split('.')
  4. x,y=len(a),len(b)  
  5. i,j=0,0
  6. equal=0
  7. while x>0 and y>0:
  8.         if int(a[x-1])>int(b[y-1]):
  9.                 i+=1
  10.         elif int(a[x-1])<int(b[y-1]):
  11.                 j+=1
  12.         x-=1
  13.         y-=1
  14. if i==j:
  15.         print(jo(a) if int(a[0])>int(b[0]) else jo(b))
  16. elif i>j:
  17.         print(jo(a))
  18. elif i<j:
  19.         print(jo(b))
  20. else:
  21.         print(jo(a) if len(a)>len(b) else jo(b))
RAW Paste Data