Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x= int(input())
- b= int(input())
- def sum_digits(x):
- s = 0
- while x!= 0:
- s += x%10
- x = x//10
- return s
- print(sum_digits(x))
- def sum_digits(x):
- s = 0
- while x!= 0:
- s += x%10
- x = x//10
- return s
- print(sum_digits(b))
- if sum_digits(x)>sum_digits(b):
- print(sum_digits(x))
- else:
- print(sum_digits(b))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement