結果

問題 No.804 野菜が苦手
ユーザー hiro_ei1812
提出日時 2019-08-14 19:05:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 272 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 54,012 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-19 14:33:03
合計ジャッジ時間 1,103 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(){
	int a,b,c,d;
	int total=0,count;
	int i,n;

	cin>>a>>b>>c>>d;

	for(count=1;total<d && c*count<b;count++){
		total=c*count+count;
	}

	if(total==0){
		cout<<'0'<<endl;
		return 0;
	}

	cout<<count<<endl;
	return 0;
}
0