1048:Buy Buy Buy

时间限制:2 S   /  内存限制:65536 KB
AC:24   /  Submit:196
问题描述

Suppose we have $$n$$ RMB, want to take to buy a coke to drink as much as possible.

The existing two kinds of packaging can choose:

1. plastic packaging, spend $$a$$ RMB;

2. glass bottle packing, the cost $$b$$ RMB, but after the drink, you can get $$c$$ RMB sell empty bottles.

We want to know, with this $$n$$ RMB, up to drink how many number of coke?


输入描述

The input consists of several test cases ( No more than $$100000$$ )

For each test case contains four integer $$n,a,b,c$$ the specific meaning as described above.

Ensure that the given number between $$1$$ and $$10^9$$, and $$b$$ is always greater than $$c$$.

输出描述

For each test case, output an integer, said can drink the most number of coke.

The output is always followed by a line feed.

样例输入复制样例

10 11 9 8

10 2 5 4

样例输出

2

8

相关

round1


Copyright 2016 - 2024 XUJC ACM Team
闽ICP备2020022076号-1