結果

問題 No.32 貯金箱の憂鬱
ユーザー ああああああああ
提出日時 2019-09-04 22:44:44
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 301 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 27,620 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-30 13:36:01
合計ジャッジ時間 734 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>

int bank(int a_100,int a_25,int a_1)
{
	int count = 0;
	
	a_25 += a_1/25; a_1 %= 25;
	a_100 += a_25/4;  a_25 %= 4;
	a_100 %= 10;
	count = a_100 + a_25 + a_1;
	
	return count;
}

int main(void)
{
	int l,m,n;
	
	scanf("%d%d%d",&l,&m,&n);
	
	printf("%d\n",bank(l,m,n));
	
	return 0;
}
0