import java.util.Scanner;标签:zzul1058,Java,Scanner,sum,System,fact From: https://www.cnblogs.com/liandaozhanshi/p/17100006.html
public class zzul1058 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
double fact = 1,sum = 0;
for (int i = 1; ; i++) {
fact *=i;//累乘
sum +=fact;//累加
if(sum >= n){
System.out.printf("m<=%d",i-1);//第i次已经大于了,所以用它的前一个
System.exit(-1);//终止代码
}
}
}
}