結果

問題 No.701 ひとりしりとり
ユーザー nonokai10nonokai10
提出日時 2018-09-30 19:44:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 664 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,552 KB
実行使用メモリ 8,892 KB
最終ジャッジ日時 2023-08-02 13:42:58
合計ジャッジ時間 2,202 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,700 KB
testcase_01 AC 18 ms
8,828 KB
testcase_02 AC 19 ms
8,856 KB
testcase_03 AC 19 ms
8,828 KB
testcase_04 AC 19 ms
8,712 KB
testcase_05 AC 19 ms
8,676 KB
testcase_06 AC 19 ms
8,740 KB
testcase_07 AC 19 ms
8,844 KB
testcase_08 AC 19 ms
8,840 KB
testcase_09 AC 25 ms
8,764 KB
testcase_10 AC 84 ms
8,892 KB
testcase_11 AC 664 ms
8,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import random
n = int(input())
moji = list("abcdefghijklmopqrstuvwxyz")
last = "a"
for i in range(n):
    x = random.sample(moji, 12)
    if i != n-1:
        print(last + "".join(x))
        last = x[-1]
    else:
        print(last + "".join(x) + "n")
0