結果
問題 |
No.46 はじめのn歩
|
ユーザー |
![]() |
提出日時 | 2021-02-04 00:44:55 |
言語 | JavaScript (node v23.5.0) |
結果 |
AC
|
実行時間 | 66 ms / 5,000 ms |
コード長 | 459 bytes |
コンパイル時間 | 32 ms |
コンパイル使用メモリ | 6,688 KB |
実行使用メモリ | 39,296 KB |
最終ジャッジ日時 | 2024-06-30 08:08:37 |
合計ジャッジ時間 | 3,489 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
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);