結果
問題 |
No.233 めぐるはめぐる (3)
|
ユーザー |
![]() |
提出日時 | 2015-07-19 12:36:10 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 450 bytes |
コンパイル時間 | 49 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 23,516 KB |
最終ジャッジ日時 | 2024-07-08 10:21:34 |
合計ジャッジ時間 | 4,694 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 WA * 3 |
ソースコード
from math import factorial as fact from itertools import permutations as perm N = int(raw_input()) used = set([raw_input() for i in range(N)]) if N >= fact(6)**2/4: print "NO" else: vow = set(perm(["i","a","a","e","u","u"])) con = perm(["n","b","m","g","r"]) for v in vow: for c in con: vc = [p[0]+p[1] for p in zip(c,v)] + [v[5]] for nl in perm(vc): name = "".join(nl) if name not in used: print name quit() print "NO"