Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sum = 0
- def popa1(a,b):
- if a//b > 0:
- return popa1(a,b*10)
- else:
- return b
- def popa2(a,b):
- global sum
- sum += a//b
- a= a - ((a//b)*b)
- b = b // 10
- if b < 1:
- return sum
- else:
- return popa2(a,b)
- a = int(input())
- f = popa1(a,1 )
- print(popa2(a,f))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement