結果

問題 No.701 ひとりしりとり
ユーザー Salmonize
提出日時 2020-03-10 12:27:06
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 429 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-15 23:10:56
合計ジャッジ時間 1,777 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

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