結果

問題 No.1764 Square
ユーザー horitaka1999
提出日時 2021-11-26 22:45:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 82,216 KB
実行使用メモリ 54,804 KB
最終ジャッジ日時 2024-06-29 18:18:45
合計ジャッジ時間 977 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
q = [deque() for _ in range(4)]
q[0].append('A')
q[0].append('E')
q[1].append('B')
q[2].append('C')
q[3].append('D')
mod = 4
K = int(input())
for i in range(K):
    x = q[i%mod].popleft()
    q[(i+1)%mod].append(x)
for i in range(4):
    print(*q[i],sep='')
0