結果

問題 No.69 文字を自由に並び替え
ユーザー yano3yano3
提出日時 2023-07-07 16:20:03
言語 TypeScript
(5.4.3)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 331 bytes
コンパイル時間 7,395 ms
コンパイル使用メモリ 254,960 KB
実行使用メモリ 44,232 KB
最終ジャッジ日時 2023-09-28 16:55:22
合計ジャッジ時間 9,631 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
42,416 KB
testcase_01 AC 79 ms
44,232 KB
testcase_02 AC 81 ms
42,432 KB
testcase_03 AC 80 ms
42,004 KB
testcase_04 AC 79 ms
42,356 KB
testcase_05 AC 78 ms
42,216 KB
testcase_06 AC 78 ms
42,116 KB
testcase_07 AC 79 ms
42,200 KB
testcase_08 AC 79 ms
42,220 KB
testcase_09 AC 79 ms
44,044 KB
testcase_10 AC 79 ms
42,420 KB
testcase_11 AC 81 ms
41,976 KB
testcase_12 AC 78 ms
42,000 KB
testcase_13 AC 78 ms
42,056 KB
testcase_14 AC 82 ms
42,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

const fs = require('fs')

function main(input: string): void {
  const [one, two] = input.split('\n')
  const oneSorted = one.split('').sort().join('')
  const twoSorted = two.split('').sort().join('')

  const res = oneSorted === twoSorted
    ? 'YES'
    : 'NO'

  console.log(res)
}

main(fs.readFileSync('/dev/stdin', 'utf8'))
0