結果

問題 No.701 ひとりしりとり
ユーザー NieRNieR
提出日時 2018-06-16 02:02:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 508 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 20,012 KB
最終ジャッジ日時 2023-09-13 05:42:48
合計ジャッジ時間 2,396 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import random

def aaa():
    while len(shiritori)<a:
        c = random.randint(1,18)
        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