結果

問題 No.69 文字を自由に並び替え
ユーザー mayoko_mayoko_
提出日時 2017-04-17 19:30:20
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 5,000 ms
コード長 248 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 6,648 KB
実行使用メモリ 6,372 KB
最終ジャッジ日時 2023-08-20 23:38:53
合計ジャッジ時間 1,416 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
6,336 KB
testcase_01 AC 13 ms
6,368 KB
testcase_02 AC 13 ms
6,204 KB
testcase_03 AC 13 ms
6,200 KB
testcase_04 AC 13 ms
6,344 KB
testcase_05 AC 13 ms
6,268 KB
testcase_06 AC 13 ms
6,372 KB
testcase_07 AC 13 ms
6,284 KB
testcase_08 AC 13 ms
6,340 KB
testcase_09 AC 13 ms
6,284 KB
testcase_10 AC 13 ms
6,184 KB
testcase_11 AC 13 ms
6,328 KB
testcase_12 AC 13 ms
6,360 KB
testcase_13 AC 13 ms
6,184 KB
testcase_14 AC 13 ms
6,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
A = raw_input()
B = raw_input()
dictA, dictB = defaultdict(int),defaultdict(int) 
for c in A:
	dictA[c] += 1
for c in B:
	dictB[c] += 1

for c in A:
	if (dictA[c] != dictB[c]):
		print "NO"
		exit(0)

print "YES"
0