結果
問題 | No.233 めぐるはめぐる (3) |
ユーザー | Tawara |
提出日時 | 2015-07-19 12:30:17 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 450 bytes |
コンパイル時間 | 63 ms |
コンパイル使用メモリ | 6,484 KB |
実行使用メモリ | 23,004 KB |
最終ジャッジ日時 | 2023-09-22 19:16:12 |
合計ジャッジ時間 | 5,945 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | AC | 65 ms
11,652 KB |
testcase_03 | AC | 134 ms
19,732 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 188 ms
23,004 KB |
testcase_08 | AC | 185 ms
22,976 KB |
testcase_09 | AC | 13 ms
6,104 KB |
testcase_10 | AC | 13 ms
6,072 KB |
testcase_11 | AC | 12 ms
6,132 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
ソースコード
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"