結果

問題 No.383 レーティング
ユーザー megane_ankomegane_anko
提出日時 2021-02-10 02:34:54
言語 TypeScript
(5.4.3)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 10,384 ms
コンパイル使用メモリ 252,744 KB
実行使用メモリ 42,460 KB
最終ジャッジ日時 2023-09-21 17:41:37
合計ジャッジ時間 12,423 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
42,220 KB
testcase_01 AC 76 ms
42,276 KB
testcase_02 AC 77 ms
42,360 KB
testcase_03 AC 75 ms
42,224 KB
testcase_04 AC 76 ms
42,232 KB
testcase_05 AC 76 ms
42,268 KB
testcase_06 AC 77 ms
42,460 KB
testcase_07 AC 76 ms
42,216 KB
testcase_08 AC 76 ms
42,404 KB
testcase_09 AC 76 ms
42,212 KB
testcase_10 AC 76 ms
42,180 KB
testcase_11 AC 76 ms
42,400 KB
testcase_12 AC 77 ms
42,356 KB
testcase_13 AC 76 ms
42,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

const input = require('fs').readFileSync('/dev/stdin', 'utf8');
let arr = input.split(' ');
let a = parseInt(arr[0]);
let b = parseInt(arr[1]);

let cha = 0;
let s = null;


if (a === b) {
    s = "0";
} else if (a < b) {
    s = `+${b-a}`
} else {
    s = `${b-a}`
}
console.log(s);
0