mohammad-hadi-babalu

Untitled

Jan 10th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. def tr(a):
  2.     b=0
  3.     while a!=0:
  4.         a=a//10
  5.         b=b+1
  6.     return b
  7. n=int(input())
  8. b=tr(n)
  9. a=b*[0]
  10. for i in range(b):
  11.     a[i]=n//10**i%10
  12. a=a[1:]+a[:1]
  13. c=0
  14. for i in range(b):
  15.     c=c+a[i]*10**i
  16. print(c)
Add Comment
Please, Sign In to add comment