結果

問題 No.1764 Square
ユーザー miya145592miya145592
提出日時 2023-05-06 02:38:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 912 ms
コンパイル使用メモリ 86,348 KB
実行使用メモリ 71,300 KB
最終ジャッジ日時 2023-08-15 08:39:41
合計ジャッジ時間 1,794 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
71,220 KB
testcase_01 AC 94 ms
71,220 KB
testcase_02 AC 93 ms
71,180 KB
testcase_03 AC 93 ms
71,112 KB
testcase_04 AC 94 ms
71,300 KB
testcase_05 AC 94 ms
71,020 KB
testcase_06 AC 92 ms
71,172 KB
testcase_07 AC 90 ms
71,188 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