restructure zeta/** to storage/zeta/**

This commit is contained in:
2025-05-10 21:54:24 +09:00
parent 2886820691
commit 2f2e0759fd
407 changed files with 7 additions and 1 deletions

23
storage/zeta/py/1158.py Normal file
View File

@@ -0,0 +1,23 @@
from collections import deque
def solve(N, K):
q = deque(range(1, N + 1))
tq = deque()
cnt = 0
ret = []
while q:
while q:
cnt += 1
cnt %= K
if cnt % K == 0:
ret.append(q.popleft())
else:
tq.append(q.popleft())
q = tq
tq = deque()
return "<" + ", ".join(map(str, ret)) + ">"
if __name__ == "__main__":
print(solve(*map(int, input().split())))