結果

問題 No.69 文字を自由に並び替え
ユーザー Tsubasa
提出日時 2018-02-02 16:43:25
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 286 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-14 06:55:03
合計ジャッジ時間 1,227 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

def main():
  A = input()
  B = input()

  a_dict = defaultdict(lambda: 0)
  for a in A:
    a_dict[a] += 1

  b_dict = defaultdict(lambda: 0)
  for b in B:
    b_dict[b] += 1

  if a_dict == b_dict:
    print("YES")
  else:
    print("NO")

main()
0