結果

問題 No.32 貯金箱の憂鬱
ユーザー kachipankachipan
提出日時 2023-06-22 16:19:42
言語 C
(gcc 12.3.0)
結果
TLE  
実行時間 -
コード長 355 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 27,728 KB
実行使用メモリ 6,120 KB
最終ジャッジ日時 2023-09-12 10:48:20
合計ジャッジ時間 13,077 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>

int main()
{
	enum Ryougae
	{
		ICHI = 25,
		NIJUGO = 4,
		HYAKU = 10,
	};
	int n = 0;
	int x = 0;
	int y = 0;
	scanf("%d", &n);
	scanf("%d", &x);
	scanf("%d", &y);

	while (y >= ICHI)
	{
		x++;
		y -= ICHI;
	}

	while (x >= NIJUGO)
	{
		n++;
		y -= NIJUGO;
	}

	while (n >= HYAKU)
	{
		n--;
	}

	printf("%d", n + x + y);

	return 0;
}
0