結果
| 問題 | No.32 貯金箱の憂鬱 | 
| コンテスト | |
| ユーザー |  ta60143 | 
| 提出日時 | 2018-10-24 17:07:15 | 
| 言語 | Rust (1.83.0 + proconio) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 5,000 ms | 
| コード長 | 709 bytes | 
| コンパイル時間 | 13,042 ms | 
| コンパイル使用メモリ | 396,760 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-23 07:18:07 | 
| 合計ジャッジ時間 | 13,017 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 12 | 
ソースコード
use std::io;
fn main() {
    let mut input = String::new();
    io::stdin().read_line(&mut input).unwrap();
    let l: u32 = input.trim().parse().unwrap();
    input = String::new();
    io::stdin().read_line(&mut input).unwrap();
    let m: u32 = input.trim().parse().unwrap();
    input = String::new();
    io::stdin().read_line(&mut input).unwrap();
    let n: u32 = input.trim().parse().unwrap();
    
    let mut total = 100 * l + 25 * m + 1 * n;
    
    let mut quantity = 0;
    total %= 1000; //1000円札に両替後の残り金額
    
    quantity += total / 100;
    total %= 100;
    
    quantity += total / 25;
    total %= 25;
    quantity += total;
    println!("{}", quantity);
    
}
            
            
            
        