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