結果
問題 |
No.804 野菜が苦手
|
ユーザー |
![]() |
提出日時 | 2019-09-10 21:36:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 521 bytes |
コンパイル時間 | 1,509 ms |
コンパイル使用メモリ | 165,540 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 16:24:27 |
合計ジャッジ時間 | 2,267 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define REP(i,a) for(int i = 0; i < (a); i++) #define ALL(a) (a).begin(),(a).end() typedef long long ll; typedef pair<int, int> P; const int INF = 1e9; const int MOD = 1e9 + 7; signed main(){ int a,b,c,d; cin >> a >> b >> c >> d; int ans = 0, cnt = 0; for(int i = 1; i <= b; i++){ cnt++; if(cnt > d){ break; } if(i % c == 0){ ans++; cnt++; } } cout << min(a, ans) << endl; }