結果

問題 No.1883 SLASH
ユーザー testtest
提出日時 2022-11-23 04:22:18
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 5,152 KB
実行使用メモリ 37,300 KB
最終ジャッジ日時 2023-10-24 17:28:06
合計ジャッジ時間 2,986 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
37,300 KB
testcase_01 AC 63 ms
37,300 KB
testcase_02 AC 64 ms
37,300 KB
testcase_03 AC 62 ms
37,300 KB
testcase_04 AC 64 ms
37,300 KB
testcase_05 AC 62 ms
37,300 KB
testcase_06 AC 62 ms
37,300 KB
testcase_07 AC 62 ms
37,300 KB
testcase_08 AC 61 ms
37,300 KB
testcase_09 AC 64 ms
37,300 KB
testcase_10 AC 64 ms
37,300 KB
testcase_11 AC 64 ms
37,300 KB
testcase_12 AC 65 ms
37,300 KB
testcase_13 AC 65 ms
37,300 KB
testcase_14 AC 63 ms
37,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function arrInt(arr) {
    return arr.map(str => parseInt(str, 10));
}
function Main(input) {
    const src = input.replace("\n", "");
    const abc = arrInt([...src]).sort((a, b) => a - b);
    const ans = abc[2] - abc[0];
    console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0