bit 1003 Exchange for Cola

Exchange for Cola

时间限制: 1秒  内存限制: 64M

Problem Description

The Cola company is holding a promotional activity that customerscan exchange B bottles of Cola with A caps. Now Silence has N caps. Furthermore, Silence can ask mm to borrow him some caps for anytimes as long as Silence is able to return the caps borrowed after he has used these caps to exchange Cola without buying any other Cola. Please tellSilence how many number of Cola Silence can drink.

Input

This problem contains multiple test cases. Each case contains oneline with three numbers N , A , B ,(1 <= N <= 10^9, 1 <= B < A <= 10^9), which have already been mentioned above.

Output

Print exactly one line with the maximal number of Cola Silence can drink by exchanging caps for each test case.

Sample Input

1 2 1

9 7 2

Sample Output

1

2

#include<stdio.h>
int main(){
	int N,A,B;

	while(~scanf("%d%d%d",&N,&A,&B)){
		//printf("%d",N*B/(A-B));
		printf("%d\n",N/(A-B)*B);	
	}	
	return 0;
}


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值