Advertisement
SonyaI

spiski4

Feb 15th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. print('Введите кол-во людей и загаданное число')
  2. n = int(input())
  3. k = int(input())
  4. res = 0
  5. for i in range(1, n+1):
  6.     res = (res + k) % i
  7.  
  8. print(res + 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement