結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 257 ms
17,736 KB
testcase_01 AC 190 ms
13,856 KB
testcase_02 AC 137 ms
12,596 KB
testcase_03 AC 210 ms
17,684 KB
testcase_04 AC 265 ms
17,760 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 267 ms
17,796 KB
testcase_08 AC 261 ms
17,808 KB
testcase_09 AC 81 ms
7,576 KB
testcase_10 AC 80 ms
7,636 KB
testcase_11 AC 79 ms
7,636 KB
testcase_12 AC 193 ms
13,872 KB
testcase_13 AC 261 ms
17,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
# -*- coding: utf-8 -*-
# †
# (;ω;)<マジで…
#
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 = set(''.join(e) for e in permutations(nya))
nykk = set(''.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