Advertisement
MatveyL

вывести по отдельности

Dec 5th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. sum = 0
  2. al = []
  3. def popa1(a,b):
  4. if a//b > 0:
  5. return popa1(a,b*10)
  6. else:
  7. return b
  8. def popa2(a,b):
  9. al.append(a//b)
  10. a = a - ((a//b)*b)
  11. b = b // 10
  12. if b < 1:
  13. return
  14. else:
  15. return popa2(a,b)
  16. a = int(input())
  17. f = popa1(a,1 )
  18. popa2(a,f)
  19. qwe =len(al)
  20. for i in range(qwe-1):
  21. print(al[i+1], end = " " )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement