結果
| 問題 | No.32 貯金箱の憂鬱 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-01-17 22:27:24 | 
| 言語 | JavaScript (node v23.5.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 68 ms / 5,000 ms | 
| コード長 | 887 bytes | 
| コンパイル時間 | 67 ms | 
| コンパイル使用メモリ | 6,944 KB | 
| 実行使用メモリ | 39,552 KB | 
| 最終ジャッジ日時 | 2024-07-23 07:03:03 | 
| 合計ジャッジ時間 | 1,748 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 12 | 
ソースコード
/* eslint no-console: "off" */
let assert = require("assert");
function tokens(s) {
    return s.trim().split(/\s+/);
}
function div_ceil(a, b) {
    return Math.trunc(a/b) + ((((a<0)^(b>0)) && a%b) ? 1 : 0);
}
function div_floor(a, b) {
    return Math.trunc(a/b) + ((((a>0)^(b>0)) && a%b) ? 1 : 0);
}
function digits(n) {
    assert(n >= 0);
    if(n == 0) return [0];
    let res = [];
    while(n > 0) {
        res.push(n % 10);
        n = div_floor(n, 10);
    }
    return res;
}
function TO_INT(s) {
    return parseInt(s, 10);
}
function Main(input) {
    let [L, M, N] = tokens(input).map(s => TO_INT(s));
    let ans = 0;
    let val = 100*L + 25*M + N;
    val %= 1000;
    ans += div_floor(val, 100);
    val %= 100;
    ans += div_floor(val, 25);
    val %= 25;
    ans += val;
    console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
            
            
            
        