結果

問題 No.857 素振り
ユーザー megane_ankomegane_anko
提出日時 2021-02-15 17:20:45
言語 TypeScript
(5.4.3)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 8,440 ms
コンパイル使用メモリ 254,448 KB
実行使用メモリ 44,548 KB
最終ジャッジ日時 2023-09-30 14:20:53
合計ジャッジ時間 10,293 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
42,288 KB
testcase_01 AC 77 ms
42,404 KB
testcase_02 AC 78 ms
42,440 KB
testcase_03 AC 79 ms
42,192 KB
testcase_04 WA -
testcase_05 AC 79 ms
42,244 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

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