結果
| 問題 |
No.233 めぐるはめぐる (3)
|
| コンテスト | |
| ユーザー |
Tawara
|
| 提出日時 | 2015-07-19 12:30:17 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 450 bytes |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 23,640 KB |
| 最終ジャッジ日時 | 2024-07-08 10:21:26 |
| 合計ジャッジ時間 | 5,052 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 WA * 7 |
ソースコード
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(v,c)] + [v[5]] for nl in perm(vc): name = "".join(nl) if name not in used: print name quit() print "NO"
Tawara