結果

問題 No.233 めぐるはめぐる (3)
コンテスト
ユーザー 🍡yurahuna
提出日時 2016-02-29 00:47:21
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 406 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 303 ms
コンパイル使用メモリ 21,340 KB
実行使用メモリ 20,520 KB
最終ジャッジ日時 2026-09-03 06:09:40
合計ジャッジ時間 5,069 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import itertools as itr

N = int(input())
if N >= 100000:
    print('NO')
    exit()

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

for a in itr.permutations(['i', 'a', 'a', 'e', 'u', 'u'], 6):
    for b in itr.permutations(['n', 'b', 'm', 'g', 'r'], 5):
        s = ""
        for i in range(5):
            s += a[i] + b[i]
        s += a[5]
        if not s in S:
            print(s)
            exit()

print('NO')
0