結果

問題 No.701 ひとりしりとり
ユーザー convexineqconvexineq
提出日時 2021-03-17 20:33:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 169 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 82,292 KB
実行使用メモリ 83,992 KB
最終ジャッジ日時 2024-04-27 13:03:51
合計ジャッジ時間 2,032 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
54,340 KB
testcase_01 AC 46 ms
54,236 KB
testcase_02 AC 43 ms
54,308 KB
testcase_03 AC 43 ms
54,180 KB
testcase_04 AC 43 ms
54,336 KB
testcase_05 AC 42 ms
55,068 KB
testcase_06 AC 42 ms
54,520 KB
testcase_07 AC 44 ms
54,900 KB
testcase_08 AC 44 ms
54,824 KB
testcase_09 AC 57 ms
65,100 KB
testcase_10 AC 81 ms
77,532 KB
testcase_11 AC 169 ms
83,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())-1
s = set()
x = "a"
L = "abcdefghijklmopqrstuvwxyz"
from random import choice
while n:
    y = x[-1]
    for i in range(19):
        if y not in s:
            print(y)
            n -= 1
            x = y
            s.add(y)
            break
        else:
            y += choice(L)
print(x[-1]+"n")
0