結果

問題 No.1764 Square
ユーザー yosaka
提出日時 2022-01-19 19:04:25
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-23 13:52:34
合計ジャッジ時間 917 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque

q0 = deque(["A", "E"])
q1 = deque(["B"])
q2 = deque(["C"])
q3 = deque(["D"])
que = [q0, q1, q2, q3]
K = int(input())
for i in range(K):
    idx = i % 4
    v = que[idx].popleft()
    idx = (i + 1) % 4
    que[idx].append(v)
for q in que:
    print("".join(q))
0