結果

問題 No.701 ひとりしりとり
ユーザー jiromarujiromaru
提出日時 2018-06-18 16:55:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 372 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 8,852 KB
最終ジャッジ日時 2023-09-13 06:48:57
合計ジャッジ時間 2,133 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,708 KB
testcase_01 AC 18 ms
8,852 KB
testcase_02 AC 18 ms
8,852 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
import random
alpha="abcdefghijklmnopqrstuvwxyz"
list=list(alpha)
start="a"
i=1
while i<=N:
    ran_int=random.randrange(len(list))
    word=random.sample(list,i)
    word.insert(0,start)
    start=word[-1]
    if start=="n":
        word.append("a")
        start="a"
    if i==N:
        word.append("n")
    print("".join(word))
    i+=1
0