結果

問題 No.46 はじめのn歩
ユーザー megane_ankomegane_anko
提出日時 2021-02-04 00:44:55
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 78 ms / 5,000 ms
コード長 459 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 42,528 KB
最終ジャッジ日時 2023-09-12 20:32:13
合計ジャッジ時間 3,645 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
42,320 KB
testcase_01 AC 76 ms
42,360 KB
testcase_02 AC 77 ms
42,104 KB
testcase_03 AC 75 ms
42,136 KB
testcase_04 AC 77 ms
42,336 KB
testcase_05 AC 77 ms
42,168 KB
testcase_06 AC 77 ms
42,268 KB
testcase_07 AC 77 ms
42,232 KB
testcase_08 AC 78 ms
42,528 KB
testcase_09 AC 77 ms
42,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

const input = require('fs').readFileSync('/dev/stdin', 'utf8');

const arr = input.split(' ');
let a = parseInt(arr[0]);
let b = parseInt(arr[1]);
let result = 0;

//console.log("aの値:" + a);
//console.log("bの値:" + b);
if ( a >= b ) {
    result = 1;
} else if ((a < b) && (b % a === 0)) {
    result = (b / a);
} else {
    result = (b / a) + 1;
    result = Math.floor(result);
    //console.log("if文に入りました");
}
console.log(result);
0