結果

問題 No.701 ひとりしりとり
ユーザー SalmonizeSalmonize
提出日時 2020-03-10 12:27:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 337 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 10,564 KB
実行使用メモリ 7,956 KB
最終ジャッジ日時 2023-08-10 00:33:21
合計ジャッジ時間 1,749 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,772 KB
testcase_01 AC 16 ms
7,772 KB
testcase_02 AC 17 ms
7,824 KB
testcase_03 AC 17 ms
7,792 KB
testcase_04 AC 16 ms
7,804 KB
testcase_05 AC 15 ms
7,920 KB
testcase_06 AC 16 ms
7,956 KB
testcase_07 AC 16 ms
7,924 KB
testcase_08 AC 16 ms
7,792 KB
testcase_09 AC 19 ms
7,860 KB
testcase_10 AC 48 ms
7,832 KB
testcase_11 AC 337 ms
7,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
l = [0]*20
oa = ord('a')
for i in range(n-1):
    s = ''.join(map(lambda x:chr(oa+x), l))
    print(s)
    l[18] += 1
    if l[18] > 25:
        idx = 18
        while l[idx] > 25:
            l[idx] = 0
            l[idx-1] += 1
            idx -= 1
print('an')
0