結果
問題 | No.233 めぐるはめぐる (3) |
ユーザー |
![]() |
提出日時 | 2022-10-30 01:09:57 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 491 ms / 1,000 ms |
コード長 | 518 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 82,252 KB |
実行使用メモリ | 104,964 KB |
最終ジャッジ日時 | 2024-07-06 21:06:41 |
合計ジャッジ時間 | 8,871 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
from itertools import permutationsX=list(permutations("nbmgr"))Y=list(permutations("iaaeuu"))S=set()for x in X:for y in Y:A=[]for i in range(5):A.append(x[i])A.append(y[i])for i in range(len(A)):S.add("".join(A[:i]+[y[-1]]+A[i:]))N=int(input())LIST=set([input() for i in range(N)])if len(LIST)==len(S):print("NO")else:for s in S:if s in LIST:passelse:print(s)break