結果

問題 No.1764 Square
ユーザー ryusuke
提出日時 2022-01-28 20:51:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 496 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 53,632 KB
最終ジャッジ日時 2024-12-30 02:53:25
合計ジャッジ時間 1,462 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque

k = int(input())

q_0 = deque()
q_1 = deque()
q_2 = deque()
q_3 = deque()

q_0.append('A')
q_0.append('E')
q_1.append('B')
q_2.append('C')
q_3.append('D')

for i in range(k):
    t = i % 4
    if t == 0:
        q_1.append(q_0.popleft())
    if t == 1:
        q_2.append(q_1.popleft())
    if t == 2:
        q_3.append(q_2.popleft())
    if t == 3:
        q_0.append(q_3.popleft())

print(*q_0, sep='')
print(*q_1, sep='')
print(*q_2, sep='')
print(*q_3, sep='')
0