結果

問題 No.1764 Square
ユーザー titiatitia
提出日時 2021-11-26 22:25:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 8,556 KB
最終ジャッジ日時 2023-09-12 05:07:25
合計ジャッジ時間 856 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,540 KB
testcase_01 AC 17 ms
8,508 KB
testcase_02 AC 18 ms
8,556 KB
testcase_03 AC 18 ms
8,492 KB
testcase_04 AC 18 ms
8,464 KB
testcase_05 AC 18 ms
8,488 KB
testcase_06 AC 18 ms
8,452 KB
testcase_07 AC 19 ms
8,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import deque

Q=[deque(["A","E"]),deque(["B"]),deque(["C"]),deque(["D"])]


K=int(input())
for i in range(K):
    j=i%4
    k=(i+1)%4

    x=Q[j].popleft()
    Q[k].append(x)

for i in range(4):
    print("".join(Q[i]))
0