結果
| 問題 | No.32 貯金箱の憂鬱 | 
| コンテスト | |
| ユーザー |  Maeda | 
| 提出日時 | 2025-03-07 13:18:27 | 
| 言語 | C (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 863 bytes | 
| コンパイル時間 | 853 ms | 
| コンパイル使用メモリ | 25,600 KB | 
| 実行使用メモリ | 8,608 KB | 
| 最終ジャッジ日時 | 2025-03-07 13:18:29 | 
| 合計ジャッジ時間 | 1,629 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 12 | 
ソースコード
#include <stdio.h>
void main(void){
	int l = 0 , m = 0 , n = 0 ;
	
	int input =  scanf("%d",&l);
	if(input == 2){
		printf("Lの入力ミス\n");
	}
	int total = 100*l;
	
	input =  scanf("%d",&m);
	if(input == 2){
		printf("Mの入力ミス\n");
	}
	total += m*25;
	
	input =  scanf("%d",&n);
	if(input == 2){
		printf("Nの入力ミス\n");
	}
	total += 1*n;
	int thousandYenBill = total / 1000;
	int remainingMoney = total - thousandYenBill;
	printf("残金:%d",remainingMoney);
	
	int coinL = 0;
	int coin = 0;
	while( remainingMoney >= 100 ){
		remainingMoney -= 100;
		coin++;
		coinL++;
	}
	int coinM = 0;
	while( remainingMoney >= 25 ){
		remainingMoney -= 25;
		coin++;
		coinM++;
	}
	printf("1000円札:%d 100円硬貨:%d 25円硬貨:%d 1円硬貨:%d\n",thousandYenBill,coinL,coinM,remainingMoney);
	printf("%d\n",coin+remainingMoney);
}
            
            
            
        