結果

問題 No.1764 Square
ユーザー koba-e964koba-e964
提出日時 2021-11-26 23:02:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 274 bytes
コンパイル時間 356 ms
コンパイル使用メモリ 86,960 KB
実行使用メモリ 71,524 KB
最終ジャッジ日時 2023-09-12 05:27:04
合計ジャッジ時間 1,695 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,356 KB
testcase_01 AC 73 ms
71,432 KB
testcase_02 AC 73 ms
71,336 KB
testcase_03 AC 76 ms
71,248 KB
testcase_04 AC 72 ms
71,524 KB
testcase_05 AC 72 ms
71,356 KB
testcase_06 AC 72 ms
71,408 KB
testcase_07 AC 73 ms
71,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3

k = int(input())
a = [[] for _ in range(4)]
a[0] = ['A', 'E']
a[1] = ['B']
a[2] = ['C']
a[3] = ['D']
for i in range(k):
    fr = i % 4
    to = (i + 1) % 4
    a[to].append(a[fr][0])
    a[fr] = a[fr][1:]

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