結果

問題 No.233 めぐるはめぐる (3)
ユーザー tnoda_tnoda_
提出日時 2015-09-14 19:38:59
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 322 ms / 1,000 ms
コード長 487 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 77,860 KB
実行使用メモリ 90,176 KB
最終ジャッジ日時 2023-09-26 11:50:50
合計ジャッジ時間 5,431 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 151 ms
87,912 KB
testcase_01 AC 130 ms
87,644 KB
testcase_02 AC 104 ms
81,348 KB
testcase_03 AC 130 ms
87,468 KB
testcase_04 AC 295 ms
89,904 KB
testcase_05 AC 287 ms
89,740 KB
testcase_06 AC 266 ms
90,176 KB
testcase_07 AC 322 ms
90,168 KB
testcase_08 AC 320 ms
89,964 KB
testcase_09 AC 77 ms
76,452 KB
testcase_10 AC 77 ms
76,340 KB
testcase_11 AC 76 ms
76,480 KB
testcase_12 AC 132 ms
87,536 KB
testcase_13 AC 153 ms
87,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations

N = input()
S = set([])
for i in xrange(N):
    S.add(raw_input())

# inabameguru
cons = list("nbmgr")
vow = list("iaaeuu")
for cs in permutations(cons):
    for vs in permutations(vow):
        base = ""
        for i in xrange(len(cs)):
            base += cs[i] + vs[i]
        for i in xrange(len(base)+1):
            name = base[:i] + vs[5] + base[i:]
            if name not in S:
                print(name)
                quit()
print('NO')
0