結果

問題 No.233 めぐるはめぐる (3)
ユーザー tnoda_tnoda_
提出日時 2015-09-10 12:50:59
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 534 bytes
コンパイル時間 559 ms
コンパイル使用メモリ 7,092 KB
実行使用メモリ 16,336 KB
最終ジャッジ日時 2023-09-26 10:25:29
合計ジャッジ時間 9,360 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 187 ms
16,108 KB
testcase_01 AC 118 ms
11,900 KB
testcase_02 AC 67 ms
10,096 KB
testcase_03 AC 138 ms
16,160 KB
testcase_04 AC 993 ms
16,312 KB
testcase_05 AC 942 ms
16,228 KB
testcase_06 AC 762 ms
16,180 KB
testcase_07 TLE -
testcase_08 TLE -
testcase_09 AC 12 ms
6,080 KB
testcase_10 AC 11 ms
6,212 KB
testcase_11 AC 12 ms
6,244 KB
testcase_12 AC 119 ms
11,932 KB
testcase_13 AC 191 ms
16,312 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.append(cs[i])
            base.append(vs[i])
        for i in xrange(len(base)+1):
            name = base[:i] + [vs[5]] + base[i:]
            if ''.join(name) not in S:
                print(''.join(name))
                quit()
print('NO')
0