結果

問題 No.46 はじめのn歩
ユーザー akuto1125
提出日時 2018-09-26 19:26:21
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 62 ms / 5,000 ms
コード長 374 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 6,820 KB
実行使用メモリ 41,200 KB
最終ジャッジ日時 2024-10-13 00:41:29
合計ジャッジ時間 1,137 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
  input = input.split(' ');
  let unit = input[0];
  let goal = input[1];

  let shou = Math.floor(parseInt(goal) / parseInt(unit));
  let amari = parseInt(goal) % parseInt(unit);
  let answer;

  if (amari > 0) {
  	answer = shou + 1;
  } else {
  	answer = shou;
  }


  console.log(answer);
}
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
0