結果

問題 No.32 貯金箱の憂鬱
ユーザー mlpj56dmlpj56d
提出日時 2017-06-22 08:43:55
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 87 ms / 5,000 ms
コード長 356 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 42,292 KB
最終ジャッジ日時 2023-09-30 11:57:50
合計ジャッジ時間 2,448 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
42,260 KB
testcase_01 AC 82 ms
42,228 KB
testcase_02 AC 80 ms
42,176 KB
testcase_03 AC 80 ms
42,232 KB
testcase_04 AC 81 ms
42,140 KB
testcase_05 AC 80 ms
42,192 KB
testcase_06 AC 81 ms
42,220 KB
testcase_07 AC 86 ms
42,132 KB
testcase_08 AC 87 ms
42,012 KB
testcase_09 AC 81 ms
42,292 KB
testcase_10 AC 80 ms
42,152 KB
testcase_11 AC 79 ms
42,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main (input) {
    var line = input.split("\n");
    var L = +line[0];
    var M = +line[1];
    var N = +line[2];

    rapt(L,M,N);
}

function rapt(L,M,N) {
  M = M + Math.floor(N / 25);
  N = N % 25 ;
  L = L + Math.floor(M / 4);
  M = M % 4 ;
  L = L % 10;

  console.log(L + M + N);
}

Main(require("fs").readFileSync("/dev/stdin" , "utf8"));
0