結果

問題 No.233 めぐるはめぐる (3)
ユーザー titiatitia
提出日時 2022-10-30 01:06:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 518 bytes
コンパイル時間 434 ms
コンパイル使用メモリ 10,836 KB
実行使用メモリ 36,420 KB
最終ジャッジ日時 2023-09-21 02:19:59
合計ジャッジ時間 19,402 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 TLE -
testcase_02 AC 978 ms
25,992 KB
testcase_03 TLE -
testcase_04 TLE -
testcase_05 TLE -
testcase_06 TLE -
testcase_07 TLE -
testcase_08 TLE -
testcase_09 AC 898 ms
20,280 KB
testcase_10 AC 912 ms
20,376 KB
testcase_11 AC 907 ms
20,364 KB
testcase_12 TLE -
testcase_13 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations

X=list(permutations("nbmgr"))
Y=list(permutations("iaaeuu"))


S=set()

for x in X:
    for y in Y:
        A=[]

        for i in range(5):
            A.append(x[i])
            A.append(y[i])

        for i in range(len(A)):
            S.add("".join(A[:i]+[y[-1]]+A[i:]))

N=int(input())
LIST=set([input() for i in range(N)])

if len(LIST)==len(S):
    print("NO")
else:
    for s in S:
        if s in LIST:
            pass
        else:
            print(s)
            break
0