dxnge

1

Oct 19th, 2021
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. d = int(input())#77
  2. n = 3
  3. s = 57
  4. while s <= 1200:
  5.     s += d
  6.     n = n + 4
  7. print(n)
  8.  
  9. #(63 - 3)/4 == 15 повторений цикла
  10. #(1200-57)/15 = 76.2, берем 77, чтоб на 15 повтор цикл заканчивался, иначе он запустится 16 раз
Advertisement
Add Comment
Please, Sign In to add comment