Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ma(n):
- a=n
- b=0
- while a!=0:
- a=a//10
- b=b+1
- c=0
- for i in range(b):
- d=n//10**i%10
- c=c+d
- return c
- n=int(input())
- for i in range(1,n):
- a=ma(i)
- if a%13==0:
- print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement