結果

問題 No.1764 Square
ユーザー lllllll88938494
提出日時 2022-01-11 07:26:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 55,508 KB
最終ジャッジ日時 2024-11-14 11:25:02
合計ジャッジ時間 1,006 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

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