結果
| 問題 | No.233 めぐるはめぐる (3) |
| コンテスト | |
| ユーザー |
terune
|
| 提出日時 | 2016-08-26 00:05:58 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 439 ms / 1,000 ms |
| コード長 | 519 bytes |
| 記録 | |
| コンパイル時間 | 573 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 42,724 KB |
| 最終ジャッジ日時 | 2026-05-08 11:08:23 |
| 合計ジャッジ時間 | 10,996 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
from itertools import permutations
N = int(input())
a = [input() for i in range(N)]
vow = ["i","a","a","e","u","u"]
con = [" ","n","b","m","g","r"]
vow_all = set( permutations(vow))
con_all = set( permutations(con))
all_list = set()
for v in vow_all:
for c in con_all:
strings = ''
for k in range(6):
strings = strings + c[k] + v[k]
all_list.add( strings.replace(' ','') )
a = set(a)
all_list -= a
if len(all_list) == 0:
print('NO')
else:
print('%s' % all_list.pop())
terune