結果

問題 No.233 めぐるはめぐる (3)
ユーザー TawaraTawara
提出日時 2015-07-19 12:36:10
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 450 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 6,672 KB
実行使用メモリ 23,028 KB
最終ジャッジ日時 2023-09-22 19:16:25
合計ジャッジ時間 5,605 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 178 ms
22,564 KB
testcase_01 AC 115 ms
14,800 KB
testcase_02 AC 66 ms
11,628 KB
testcase_03 AC 138 ms
19,732 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 186 ms
22,972 KB
testcase_08 AC 180 ms
22,976 KB
testcase_09 AC 12 ms
6,056 KB
testcase_10 AC 12 ms
6,040 KB
testcase_11 AC 12 ms
6,088 KB
testcase_12 AC 121 ms
14,948 KB
testcase_13 AC 180 ms
22,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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"
0