結果

問題 No.701 ひとりしりとり
ユーザー xkumiyuxkumiyu
提出日時 2018-06-15 22:33:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 387 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 15,552 KB
最終ジャッジ日時 2023-09-13 04:50:57
合計ジャッジ時間 6,951 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import random
import string

n = int(input())
a = []


def gen():
    while True:
        s = ''.join([
            random.choice(string.ascii_lowercase)
            for i in range(random.randint(1, 19))
        ])
        if s[-1] != 'n' and s not in a:
            a.append(s)
            break
    return s


for i in range(n - 1):
    s = gen()
    print(s)
s = gen()
print(s + 'n')
0