結果

問題 No.233 めぐるはめぐる (3)
ユーザー teruneterune
提出日時 2016-08-25 23:04:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 651 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 76,372 KB
最終ジャッジ日時 2024-04-25 16:07:27
合計ジャッジ時間 5,032 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

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)
con_size = len(con_all)
all_list = []
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_list.append( strings.replace(' ','') )

all_list = list(set(all_list))

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

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