結果

問題 No.1764 Square
ユーザー ryusukeryusuke
提出日時 2022-01-28 20:51:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 496 bytes
コンパイル時間 1,898 ms
コンパイル使用メモリ 86,496 KB
実行使用メモリ 71,728 KB
最終ジャッジ日時 2023-08-28 18:21:01
合計ジャッジ時間 2,075 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
71,728 KB
testcase_01 AC 87 ms
71,580 KB
testcase_02 AC 85 ms
71,448 KB
testcase_03 AC 86 ms
71,532 KB
testcase_04 AC 91 ms
71,636 KB
testcase_05 AC 88 ms
71,528 KB
testcase_06 AC 87 ms
71,428 KB
testcase_07 AC 87 ms
71,504 KB
権限があれば一括ダウンロードができます

ソースコード

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