結果
問題 |
No.233 めぐるはめぐる (3)
|
ユーザー |
![]() |
提出日時 | 2016-08-26 00:05:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 670 ms / 1,000 ms |
コード長 | 519 bytes |
コンパイル時間 | 342 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 39,584 KB |
最終ジャッジ日時 | 2024-11-08 04:08:09 |
合計ジャッジ時間 | 11,266 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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())