結果

問題 No.233 めぐるはめぐる (3)
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-06-26 23:14:10
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 559 bytes
コンパイル時間 610 ms
コンパイル使用メモリ 6,668 KB
実行使用メモリ 17,840 KB
最終ジャッジ日時 2023-09-22 01:33:59
合計ジャッジ時間 6,639 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 260 ms
17,812 KB
testcase_01 AC 193 ms
13,952 KB
testcase_02 AC 136 ms
12,584 KB
testcase_03 AC 207 ms
17,840 KB
testcase_04 AC 259 ms
17,788 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 260 ms
17,792 KB
testcase_08 AC 263 ms
17,740 KB
testcase_09 AC 79 ms
7,632 KB
testcase_10 AC 80 ms
7,664 KB
testcase_11 AC 79 ms
7,684 KB
testcase_12 AC 190 ms
13,788 KB
testcase_13 AC 258 ms
17,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
from itertools import permutations, product, izip_longest
who = 'inabameguru'
nya = ''.join(who[i] for i in xrange(0, len(who), 2))
nyk = ''.join(who[i] for i in xrange(1, len(who), 2))
nyaa = {''.join(e) for e in permutations(nya)}
nykk = {''.join(e) for e in permutations(nyk)}
sett = set()
for ele in product(nyaa, nykk):
    sett.add(''.join(map(lambda e: ''.join(e), izip_longest(*ele, fillvalue=''))))
n = int(raw_input())
s = set(raw_input() for _ in xrange(n))
sett -= s
if len(sett) > 0:
    print list(sett)[0]
else:
    print 'NO'
0