結果

問題 No.233 めぐるはめぐる (3)
ユーザー 🍡yurahuna🍡yurahuna
提出日時 2016-02-29 00:47:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 11,860 KB
実行使用メモリ 16,412 KB
最終ジャッジ日時 2023-10-24 18:57:46
合計ジャッジ時間 4,231 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 167 ms
15,832 KB
testcase_02 AC 96 ms
12,924 KB
testcase_03 AC 181 ms
16,412 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 30 ms
10,064 KB
testcase_08 AC 30 ms
10,064 KB
testcase_09 AC 29 ms
10,056 KB
testcase_10 AC 29 ms
10,056 KB
testcase_11 AC 29 ms
10,056 KB
testcase_12 AC 166 ms
15,884 KB
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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