結果

問題 No.32 貯金箱の憂鬱
ユーザー shimagera_san
提出日時 2017-09-02 21:50:22
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 297 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 54,716 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-23 06:39:17
合計ジャッジ時間 1,276 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

int main(void)
{
	int L, M, N;
	cin >> L;
	cin >> M;
	cin >> N;

	int K = 0;

	while (N >= 25)
	{
		N -= 25;
		M++;
	}
	while(M * 25 >= 100)
	{
		M -= 4;
		L++;
	}
	while(L * 100 >= 1000)
	{
		L -= 10;
		K++;
	}

	cout << L + M + N << endl;

	return 0;
}
0