結果

問題 No.701 ひとりしりとり
ユーザー toyuzukotoyuzuko
提出日時 2020-07-02 19:33:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 895 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 9,884 KB
最終ジャッジ日時 2023-10-13 05:28:20
合計ジャッジ時間 2,618 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,664 KB
testcase_01 AC 28 ms
9,684 KB
testcase_02 AC 28 ms
9,824 KB
testcase_03 AC 29 ms
9,656 KB
testcase_04 AC 29 ms
9,792 KB
testcase_05 AC 28 ms
9,712 KB
testcase_06 AC 29 ms
9,824 KB
testcase_07 AC 28 ms
9,808 KB
testcase_08 AC 29 ms
9,664 KB
testcase_09 AC 38 ms
9,724 KB
testcase_10 AC 116 ms
9,884 KB
testcase_11 AC 895 ms
9,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from random import choice
import string

N = int(input())

t = 'a'

for _ in range(N - 1):
    p = [choice(string.ascii_lowercase) for _ in range(19)]
    if p[-1] == 'n':
        p[-1] = 'a'
    print(t + ''.join(p))
    t = p[-1]

print(t + 'n')
0