結果

問題 No.32 貯金箱の憂鬱
ユーザー mizusimizusi
提出日時 2019-02-11 14:38:08
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 386 bytes
コンパイル時間 1,470 ms
コンパイル使用メモリ 26,460 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-25 12:55:42
合計ジャッジ時間 1,644 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,380 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
int main(){
	int one_coin=0,two_five=0,hundred=0,thousand=0,sum=0;
	scanf("%d",&hundred);
	scanf("%d",&two_five);
	scanf("%d",&one_coin);
	sum = one_coin+(two_five*25)+(hundred*100);
	thousand = sum/1000;
	sum %= 1000;
	hundred = sum/100;
	sum %= 100;
	two_five = sum/25;
	sum %= 25;
	one_coin = sum;
	printf("%d\n",(thousand+hundred+two_five+one_coin));
	return 0;
}
0