解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int M = input.nextInt();
int N = input.nextInt();
int X = input.nextInt();
while (X * N >= M && M >= N) {
X = X - (int) Math.ceil(1.0 * M / N);
N = N + M / N;
}
System.out.print(N);
}
}
0.0分
1 人评分