← Back to List

25904번: 안녕 클레오파트라 세상에서 제일가는 포테이토칩 ↗

Solutions

Python 3
165 B | 165 chars
n, x = map(int, input().split())
t = [*map(int, input().split())]

idx = 0

while 1:
  if t[idx] < x:
    break
  
  x += 1
  
  idx = (idx + 1) % n

print(idx + 1)