結果

問題 No.804 野菜が苦手
ユーザー ooaiu
提出日時 2025-07-10 01:56:09
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 2,980 ms
コンパイル使用メモリ 275,428 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-07-10 01:56:15
合計ジャッジ時間 4,149 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main() {
	std::ios_base::sync_with_stdio(false);
	std::cin.tie(nullptr);
	int A,B,C,D;
	cin>>A>>B>>C>>D;
	int ans = 0;
	for(int a = 0; a <= A; a++) {
		int b = a*C;
		if(a+b <= D) {
			ans = a;
		}
	}
	cout << ans << endl;
}
0