結果

問題 No.69 文字を自由に並び替え
ユーザー swyroak
提出日時 2021-08-15 14:07:07
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 546 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 39,424 KB
最終ジャッジ日時 2024-10-07 14:46:21
合計ジャッジ時間 2,873 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

"use strict";
//テストの入力を受け取る
function Main(input) {
    const [A, B] = input.split("\n").map(i => {
        if (i === "") {
            return "";
        }
        else {
            return i.split("").sort().reduce((accum, current) => accum += current);
        }
    });
    if (A === B) {
        console.log("YES");
    }
    else {
        console.log("NO");
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
// Main(`hurjztkyua
// urjukzthua
// `);
//# sourceMappingURL=index.js.map
0