結果

問題 No.1764 Square
ユーザー lllllll88938494lllllll88938494
提出日時 2022-01-11 07:26:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 82,236 KB
実行使用メモリ 54,936 KB
最終ジャッジ日時 2024-04-26 20:29:43
合計ジャッジ時間 1,059 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
54,936 KB
testcase_01 AC 41 ms
54,332 KB
testcase_02 AC 41 ms
54,312 KB
testcase_03 AC 42 ms
53,836 KB
testcase_04 AC 42 ms
54,624 KB
testcase_05 AC 41 ms
54,628 KB
testcase_06 AC 41 ms
54,216 KB
testcase_07 AC 41 ms
53,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque


a=deque('A')
b=deque('B')
c=deque('C')
d=deque('D')
a.append('E')
dic={0:a,1:b,2:c,3:d}
k=int(input())

for i in range(1,k+1):
    if len(dic[(i-1)%4]) == 0:
        continue
    dic[i%4].append(dic[(i-1)%4].popleft())

for i in range(4):
    print(''.join(dic[i]))
0