#include<iostream> //#include<limits> using namespace std; double jie(int num) { if(num==0) return 1; else return num*jie(num-1); } int main() { int maxint=INT_MAX; int num=0; while(jie(num)<=maxint) { num++; } cout<<num-1<<endl; return 0; }
#include<iostream> //#include<limits> using namespace std; double jie(int num) { if(num==0) return 1; else return num*jie(num-1); } int main() { int maxint=INT_MAX; int num=0; while(jie(num)<=maxint) { num++; } cout<<num-1<<endl; return 0; }