题目:
解析
代码
import java.util.Scanner;public class Main {public static void main(String[] args) {// TODO Auto-generated method stubScanner input = new Scanner(System.in);int apple,time,rate;
apple=input.nextInt();
rate=input.nextInt();
time=input.nextInt();if(rate == 0)
{System.out.println("0");
}
else if((apple-time/rate)<0)
{System.out.println("0");
}
else
{if(time%rate!=0){System.out.println((apple-time/rate)-1);}elseSystem.out.println(apple-time/rate);
}}}
希望对您有所帮助!!Thanks♪(・ω・)ノ