結果

問題 No.233 めぐるはめぐる (3)
ユーザー teruneterune
提出日時 2016-08-25 22:41:30
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 601 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,120 KB
最終ジャッジ日時 2024-11-08 03:15:15
合計ジャッジ時間 9,286 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other RE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations, product
N = int(input())
a = [input() for i in range(N)]
vow = 'iaaeuu'
con = ' nbmgr'
vow_all = list(map(''.join, permutations(vow)))
con_all = list(map(''.join, permutations(con)))
vow_size = len(vow_all)//6
con_size = len(con_all)//6
all = []
for i in range(vow_size):
    for j in range(con_size):
        strings = ''
        for k in range(6):
            strings = strings + con_all[j][k] + vow_all[i][k]
        all.append( strings.replace(' ','') )

for i in range(N):
    all.remove(a[i])

if len(all) == 0:
    print('NO')
else:
    print('%s' % all[0])
0