結果
問題 | No.233 めぐるはめぐる (3) |
ユーザー |
👑 ![]() |
提出日時 | 2021-07-16 19:59:39 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 368 ms / 1,000 ms |
コード長 | 397 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 96,852 KB |
最終ジャッジ日時 | 2024-07-06 06:37:19 |
合計ジャッジ時間 | 7,904 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
from itertools import permutations N=int(input()) S=set() for _ in range(N): S.add(input()) T=set() for a in permutations(["i","a","a","e","u","u"]): for b in permutations(["n","b","m","g","r",""]): X=[""]*12 for i in range(6): X[2*i ]=b[i] X[2*i+1]=a[i] T.add("".join(X)) U=T-S if U: x=U.pop() print(x) else: print("NO")