結果

問題 No.2268 NGワード回避
ユーザー SPD_9X2
提出日時 2023-04-14 21:54:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 62 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 82,448 KB
実行使用メモリ 71,336 KB
最終ジャッジ日時 2024-10-10 12:40:22
合計ジャッジ時間 4,663 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 52
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import random

N = int(input())

S = set([input() for i in range(N)])


while True:

    ab = "ab"
    x = "".join( [ab[random.randint(0,1)] for i in range(N)] )

    if x not in S:
        print (x)
        sys.exit()
0