create dev channel

This commit is contained in:
2025-05-07 04:44:30 +09:00
parent 603fca2b20
commit 16a8e59450
426 changed files with 643 additions and 36 deletions

23
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())))