結果

問題 No.233 めぐるはめぐる (3)
ユーザー teruneterune
提出日時 2016-08-25 22:41:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 601 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,120 KB
最終ジャッジ日時 2024-04-25 16:06:46
合計ジャッジ時間 8,103 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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