結果

問題 No.1764 Square
ユーザー ryusukeryusuke
提出日時 2022-01-28 20:51:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 496 bytes
コンパイル時間 500 ms
コンパイル使用メモリ 82,320 KB
実行使用メモリ 55,788 KB
最終ジャッジ日時 2024-06-09 13:33:53
合計ジャッジ時間 1,063 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
54,984 KB
testcase_01 AC 39 ms
53,984 KB
testcase_02 AC 38 ms
55,788 KB
testcase_03 AC 35 ms
55,248 KB
testcase_04 AC 36 ms
55,028 KB
testcase_05 AC 34 ms
54,832 KB
testcase_06 AC 35 ms
55,188 KB
testcase_07 AC 36 ms
53,628 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