結果

問題 No.32 貯金箱の憂鬱
ユーザー akuto1125akuto1125
提出日時 2018-10-02 23:46:50
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 426 bytes
コンパイル時間 40 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 42,368 KB
最終ジャッジ日時 2023-09-30 13:15:29
合計ジャッジ時間 1,901 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
42,276 KB
testcase_01 AC 78 ms
42,272 KB
testcase_02 AC 77 ms
42,152 KB
testcase_03 AC 78 ms
42,148 KB
testcase_04 AC 78 ms
42,152 KB
testcase_05 AC 82 ms
42,192 KB
testcase_06 AC 81 ms
42,340 KB
testcase_07 AC 77 ms
42,132 KB
testcase_08 AC 79 ms
42,332 KB
testcase_09 AC 79 ms
42,368 KB
testcase_10 AC 77 ms
42,304 KB
testcase_11 AC 77 ms
42,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
  input = input.split('\n');
  let K = 0;
  let L = parseInt(input[0]);
  let M = parseInt(input[1]);
  let N = parseInt(input[2]);

  if (N >= 25) {
    M += Math.floor(N / 25);
    N %= 25;
  }
  if (M >= 4) {
    L += Math.floor(M / 4);
    M %= 4;
  }
  if (L >= 10) {
    K += Math.floor(L / 10);
    L %= 10;
  }

  console.log(L + M + N);
}
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
0