結果
問題 |
No.804 野菜が苦手
|
ユーザー |
|
提出日時 | 2025-07-10 01:57:10 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 285 bytes |
コンパイル時間 | 2,947 ms |
コンパイル使用メモリ | 275,440 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-07-10 01:57:14 |
合計ジャッジ時間 | 4,095 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#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 && b <= B) { ans = a; } } cout << ans << endl; }