結果

問題 No.32 貯金箱の憂鬱
ユーザー akuto1125akuto1125
提出日時 2018-10-02 23:40:10
言語 JavaScript
(node v21.7.1)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 39,552 KB
最終ジャッジ日時 2024-04-21 02:13:01
合計ジャッジ時間 1,483 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
39,296 KB
testcase_01 AC 65 ms
39,168 KB
testcase_02 AC 65 ms
39,296 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 61 ms
39,296 KB
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

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.ceil(N / 25);
    N %= 25;
  }
  if (M >= 4) {
    L += Math.ceil(M / 4);
    M %= 4;
  }
  if (L >= 10) {
    K += Math.ceil(L / 10);
    L %= 10;
  }

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