結果

問題 No.233 めぐるはめぐる (3)
ユーザー TsubajiroTsubajiro
提出日時 2022-05-19 00:36:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 553 bytes
コンパイル時間 1,007 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 22,356 KB
最終ジャッジ日時 2023-10-17 06:14:31
合計ジャッジ時間 11,409 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 285 ms
22,092 KB
testcase_01 AC 196 ms
21,028 KB
testcase_02 AC 110 ms
14,760 KB
testcase_03 AC 213 ms
21,028 KB
testcase_04 TLE -
testcase_05 TLE -
testcase_06 AC 845 ms
22,356 KB
testcase_07 TLE -
testcase_08 TLE -
testcase_09 AC 28 ms
10,268 KB
testcase_10 AC 28 ms
10,268 KB
testcase_11 AC 27 ms
10,268 KB
testcase_12 AC 198 ms
21,028 KB
testcase_13 AC 291 ms
22,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = []
candi = set()
for _ in range(N):
    s=input()
    candi.add(s)
s = ["n","b","m","g","r",""]
b = ["i","a","a","e","u","u"]
#print(candi)
s5=[]
b6=[]

for i in range(6):
    if i<5:
        s5.append(i)
    b6.append(i)

import itertools
ss = list(itertools.permutations(s))
bb = list(itertools.permutations(b))
#print(ss)
#sprint(ss)
flag=False
for i in ss:
    for j in bb:
        ca = ""
        for k in range(len(i)):
            ca+=i[k]+j[k]
        if ca not in candi:
            print(ca)
            exit()
print("No")
0