Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def jo(s):return '.'.join(s)
- a,b=map(str,input().split())
- a,b=a.split('.'),b.split('.')
- x,y=len(a),len(b)
- i,j=0,0
- equal=0
- while x>0 and y>0:
- if int(a[x-1])>int(b[y-1]):
- i+=1
- elif int(a[x-1])<int(b[y-1]):
- j+=1
- x-=1
- y-=1
- if i==j:
- print(jo(a) if int(a[0])>int(b[0]) else jo(b))
- elif i>j:
- print(jo(a))
- elif i<j:
- print(jo(b))
- else:
- print(jo(a) if len(a)>len(b) else jo(b))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement