結果

問題 No.701 ひとりしりとり
ユーザー JunOnumaJunOnuma
提出日時 2018-06-28 11:03:31
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 378 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 6,664 KB
実行使用メモリ 17,592 KB
最終ジャッジ日時 2023-09-13 14:39:04
合計ジャッジ時間 5,049 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,844 KB
testcase_01 AC 17 ms
8,772 KB
testcase_02 AC 15 ms
8,668 KB
testcase_03 AC 16 ms
8,768 KB
testcase_04 AC 15 ms
8,792 KB
testcase_05 AC 15 ms
8,684 KB
testcase_06 AC 16 ms
8,848 KB
testcase_07 AC 16 ms
8,812 KB
testcase_08 AC 16 ms
8,824 KB
testcase_09 AC 30 ms
8,812 KB
testcase_10 AC 688 ms
9,648 KB
testcase_11 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import string
import random

def randomString(l):
    return ''.join([random.choice(string.ascii_lowercase) for _ in range(l)])
    
n = int(raw_input())
ls = []
for _ in range(n-1):
    s = randomString(15)
    while s in ls:
        s = randomString(15)
    ls.append(s)
    print "a" + s + "a"
s = randomString(15)
while s in ls:
    s = randomString(15)
print "a" + s + "n"
0