結果

問題 No.804 野菜が苦手
ユーザー masakiGit
提出日時 2019-04-04 14:06:33
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 520 ms
コンパイル使用メモリ 62,720 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-25 22:53:46
合計ジャッジ時間 1,394 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main() {
	int a, b, c, d, cnt;
	cin >> a >> b >> c >> d;
	cnt = 1;
	while (true) {
		if (a >= cnt && b >= cnt * c && d >= cnt + cnt * c) {
			cnt++;
		}
		else {
			cout << cnt - 1 << endl;
			break;
		}
	}
	return 0;
}
0