結果

問題 No.233 めぐるはめぐる (3)
コンテスト
ユーザー titia
提出日時 2022-10-30 01:06:46
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 937 ms / 1,000 ms
コード長 518 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 490 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 42,520 KB
最終ジャッジ日時 2026-03-28 10:57:43
合計ジャッジ時間 15,949 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from itertools import permutations

X=list(permutations("nbmgr"))
Y=list(permutations("iaaeuu"))


S=set()

for x in X:
    for y in Y:
        A=[]

        for i in range(5):
            A.append(x[i])
            A.append(y[i])

        for i in range(len(A)):
            S.add("".join(A[:i]+[y[-1]]+A[i:]))

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

if len(LIST)==len(S):
    print("NO")
else:
    for s in S:
        if s in LIST:
            pass
        else:
            print(s)
            break
0