import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int x,f,d,p;
Scanner scanner=new Scanner(System.in);
x=scanner.nextInt();
f=scanner.nextInt();
d=scanner.nextInt();
p=scanner.nextInt();
if(x*f>d){
System.out.print(d/x);
}else{
System.out.print(f+(d-x*f)/(x+p));
}
}
}
网易笔试在线编程_ 独立的小易
最新推荐文章于 2018-04-24 21:14:59 发布