Sofya_Soloveva_

Untitled

Jul 13th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. def summ():
  2.     number = int(input())
  3.     s = 0
  4.     while number != 0:
  5.         s += number%10
  6.         number //= 10
  7.         return s
  8. if summ() > summ():         #нужно ли условие, когда равно?
  9.     print(1)
  10. else:
  11.     print(2)
Advertisement
Add Comment
Please, Sign In to add comment