結果

問題 No.804 野菜が苦手
ユーザー pengin_2000
提出日時 2019-07-05 19:47:52
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 241 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 28,800 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 04:38:12
合計ジャッジ時間 887 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
int main()
{
	int a, b, c, d;
	scanf("%d %d %d %d", &a, &b, &c, &d);
	int ans;
	for (ans = 0; ans <= a; ans++)
	{
		if (b < ans * c)
			break;
		if (ans * (c + 1) > d)
			break;
	}
	ans--;
	printf("%d\n", ans);
	return 0;
}
0