Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = int(input())#2
- Q = 9; L = 0
- if x < Q:
- t = x
- x = Q
- Q = t
- while x >= Q:
- L += 1
- x -= Q
- M = x
- print(L)
- print(M)
- # L_k = 4, 4 повтора
- #x - 3*Q >= 9
- # x == 36
- #x - 4*Q < 9
- # x < 4*9 + 9
- # x < 45
- #36 - 4*Q == 36 - 4*9 == 0 (4 повтора - x == 0)
- #37 (после 4 повторов x == 1, M = x == 1)
- #x = 9; Q = t
- #x - 4*Q == 1
- #9 - 1 == 4*Q
- #Q == 2
- #x == 2
Advertisement
Add Comment
Please, Sign In to add comment