Advertisement
Guest User

IKT2

a guest
Feb 24th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. x = int(input())
  2. L = 0; M = 0
  3. while x > 0:
  4. L = L + 1
  5. if x % 8 != 0:
  6. M = M + x % 8
  7. x = x // 8
  8. print(L, M)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement