結果
問題 | No.804 野菜が苦手 |
ユーザー |
![]() |
提出日時 | 2020-06-07 23:27:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 460 bytes |
コンパイル時間 | 870 ms |
コンパイル使用メモリ | 89,992 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 22:34:54 |
合計ジャッジ時間 | 1,768 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 6 WA * 12 |
ソースコード
#include<iostream>#include<math.h>#include<string.h>#include<vector>#include<algorithm>#include<iomanip>#include<deque>#include<map>#include<stdio.h>using namespace std;int main(){cin.tie(0);ios::sync_with_stdio(false);int a,b,c,d;cin >> a >> b >> c >> d;int ans=0;while(1){a--;d-=c;if(ans==0 && d<0){cout << ans << endl;return 0;}ans++;if(a<=0 || d<=0){cout << ans << endl;break;}}return 0;}