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