結果
| 問題 |
No.804 野菜が苦手
|
| コンテスト | |
| ユーザー |
hiro_ei1812
|
| 提出日時 | 2019-08-14 19:09:56 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 295 bytes |
| コンパイル時間 | 519 ms |
| コンパイル使用メモリ | 54,228 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-19 14:33:30 |
| 合計ジャッジ時間 | 1,221 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 9 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int a,b,c,d;
int total,count;
int i,n;
cin>>a>>b>>c>>d;
total=a+b;
for(count=1;total<d && c*count<b && count<a;count++){
total=c*count+count;
}
if(total==a+b){
cout<<'0'<<endl;
return 0;
}
cout<<count<<endl;
return 0;
}
hiro_ei1812