結果
問題 | No.233 めぐるはめぐる (3) |
ユーザー | Guest |
提出日時 | 2019-07-19 14:53:16 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 739 ms / 1,000 ms |
コード長 | 412 bytes |
コンパイル時間 | 427 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 39,420 KB |
最終ジャッジ日時 | 2024-12-26 00:05:59 |
合計ジャッジ時間 | 12,738 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
import itertools voewl=['i','a','a','e','u','u'] consonant=['','n','b','m','g','r'] vs = set(itertools.permutations(voewl)) cs = set(itertools.permutations(consonant)) sn=set() all=set() n=int(input()) for i in range(n): sn.add(input()) for i in vs: for j in cs: str='' for k in range(6): str = str+j[k]+i[k] all.add(str) if len(all)==n: print('NO') else: all-=sn print(all.pop())