結果
| 問題 | 
                            No.32 貯金箱の憂鬱
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kurobei72
                         | 
                    
| 提出日時 | 2018-01-19 14:45:52 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 145 ms / 5,000 ms | 
| コード長 | 916 bytes | 
| コンパイル時間 | 2,492 ms | 
| コンパイル使用メモリ | 75,276 KB | 
| 実行使用メモリ | 54,604 KB | 
| 最終ジャッジ日時 | 2024-07-23 07:03:19 | 
| 合計ジャッジ時間 | 5,036 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 12 | 
ソースコード
import java.util.Scanner;
import java.util.ArrayList;
import java.lang.String;
import java.lang.Integer;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Integer _1000 = 0;
        Integer _100 = sc.nextInt();
        Integer _25 = sc.nextInt();
        Integer _1 = sc.nextInt();
        int bSum = _1 + _25*25 + _100*100;
        int count = 0;
        
        if (_1/25 > 0){
            _25 += _1/25;
            _1 = _1%25;
        }
        if (_25/4 > 0 ){
            _100 += _25/4;
            _25 = _25%4;
        }
        if (_100/10 > 0){
            _1000 += _100/10;
            _100 = _100%10;
        }
        int aSum = _1 + _25*25 + _100*100 + _1000 * 1000;
        if (aSum != bSum) {
            System.out.println("!");
        }
        count = _1 + _25 + _100;
        System.out.println(count);
    }
}
            
            
            
        
            
kurobei72