結果

問題 No.701 ひとりしりとり
ユーザー NieRNieR
提出日時 2018-06-16 01:53:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 567 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 19,992 KB
最終ジャッジ日時 2023-09-13 05:41:56
合計ジャッジ時間 2,245 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import random

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

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

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