Advertisement
AlimusSifar

Boys in the Assembly - Toph.co - Math

May 1st, 2020
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. N, R = map(int, input().split())
  2. sl = input().split()
  3.  
  4. first = R % len(sl)
  5. last = (len(sl) - 1 + R) % len(sl)
  6.  
  7. print(sl[first], sl[last])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement