結果

問題 No.69 文字を自由に並び替え
ユーザー Shin09shinShin09shin
提出日時 2019-01-16 22:22:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,966 ms / 5,000 ms
コード長 224 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 495,452 KB
最終ジャッジ日時 2023-08-21 00:12:51
合計ジャッジ時間 5,372 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
8,984 KB
testcase_01 AC 25 ms
8,928 KB
testcase_02 AC 25 ms
8,924 KB
testcase_03 AC 25 ms
9,044 KB
testcase_04 AC 25 ms
8,984 KB
testcase_05 AC 26 ms
8,984 KB
testcase_06 AC 27 ms
9,424 KB
testcase_07 AC 168 ms
51,608 KB
testcase_08 AC 1,966 ms
495,452 KB
testcase_09 AC 1,928 ms
495,368 KB
testcase_10 AC 26 ms
8,924 KB
testcase_11 AC 38 ms
13,656 KB
testcase_12 AC 38 ms
13,496 KB
testcase_13 AC 25 ms
8,924 KB
testcase_14 AC 25 ms
8,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
import re

a = input()
b = input()

pattern = r'([a-z])'
listA = re.findall(pattern, a)
c = 'NO'
for i in list(itertools.permutations(listA)):
    if ''.join(i) == b:
        c = 'YES'
        break
print(c)
0