結果

問題 No.857 素振り
ユーザー megane_ankomegane_anko
提出日時 2021-02-15 18:48:14
言語 TypeScript
(5.4.3)
結果
AC  
実行時間 80 ms / 1,000 ms
コード長 360 bytes
コンパイル時間 8,024 ms
コンパイル使用メモリ 252,716 KB
実行使用メモリ 42,536 KB
最終ジャッジ日時 2023-09-30 16:02:22
合計ジャッジ時間 9,276 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
42,376 KB
testcase_01 AC 79 ms
42,312 KB
testcase_02 AC 80 ms
42,404 KB
testcase_03 AC 80 ms
42,376 KB
testcase_04 AC 79 ms
42,536 KB
testcase_05 AC 80 ms
42,288 KB
testcase_06 AC 80 ms
42,292 KB
testcase_07 AC 79 ms
42,424 KB
testcase_08 AC 80 ms
42,412 KB
testcase_09 AC 79 ms
42,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import * as fs from 'fs';
const input = fs.readFileSync('/dev/stdin', 'utf8');

const arr = input.split(/[ \n]/);
let X = BigInt(arr[0]);
let Y = BigInt(arr[1]);
let Z = BigInt(arr[2]);

if (Y <= Z) {
    console.log(String(Z - BigInt(2)));
} else if (X <= Z && Z < Y) {
    console.log(String(Z - BigInt(1)));
} else if (Z < X) {
    console.log(String(Z));
}
0