SHARE
TWEET

Untitled

Sofya_Soloveva_ Jul 18th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. i = 0
  2. people = list(range(1,int(input())+1))
  3. k = int(input())
  4. while len(people) > 1 :
  5.     i = (i+k-1)%len(people)
  6.     del people[i]
  7. print(people[0])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top