結果

問題 No.69 文字を自由に並び替え
ユーザー sasaken555
提出日時 2016-12-23 00:14:01
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 80 ms / 5,000 ms
コード長 408 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 5,120 KB
実行使用メモリ 40,448 KB
最終ジャッジ日時 2024-10-13 00:05:17
合計ジャッジ時間 1,777 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

lines = [];
let reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on('line', function(line) {
  lines.push(line);
});

reader.on('close', function(line) {
  let A = lines[0].split("");
  let B = lines[1].split("");

  if(A.sort().toString() === B.sort().toString()) {
    return console.log('YES');
  }
  else {
    return console.log('NO');
  }
});
0