結果

問題 No.1764 Square
ユーザー miya145592miya145592
提出日時 2023-05-06 02:38:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 230 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 53,504 KB
最終ジャッジ日時 2024-05-02 20:20:50
合計ジャッジ時間 1,319 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
53,248 KB
testcase_01 AC 47 ms
53,376 KB
testcase_02 AC 46 ms
53,376 KB
testcase_03 AC 46 ms
53,376 KB
testcase_04 AC 45 ms
53,248 KB
testcase_05 AC 46 ms
53,376 KB
testcase_06 AC 46 ms
53,504 KB
testcase_07 AC 45 ms
53,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
K = int(input())
deq = [deque() for _ in range(4)]
for i in range(5):
    deq[i%4].append(chr(ord('A')+i))
for i in range(K):
    c = deq[i%4].popleft()
    deq[(i+1)%4].append(c)
for i in range(4):
    print("".join(deq[i]))
0