結果

問題 No.701 ひとりしりとり
ユーザー NieR
提出日時 2018-06-16 01:57:20
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 508 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,452 KB
最終ジャッジ日時 2024-06-30 15:52:31
合計ジャッジ時間 2,348 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

import random

def aaa():
    while len(shiritori)<a:
        c = random.randint(0,10)
        for i in range(c):
            b = random.choice("abcdefghijklmopqrstuvwxyz")
            global word
            word = word + b

            if i == c-1:
                if len(shiritori)==a-1:
                    word = word+'n'
                print(word)
                shiritori.add(word)
                word = b

a = int(input())
word = random.choice("abcdefghijklmopqrstuvwxyz")
shiritori = set()
aaa()
0