Karrykk @ 2024-12-17 23:29:18
四个测试点全错,快救救孩子吧
#include<stdio.h>
int jc(int x)
{
int j;
int s=1;
for(j=0;j<=x;j++)
{
s=s*x;
}
return s;
}
int main()
{
int n,i;
scanf("%d",&n);
int sum=0;
for(i=0;i<n;i++)
{
sum+=jc(i);
}
printf("%d",sum);
return 0;
}
by liruizhou_lihui @ 2024-12-17 23:33:46
@Karrykk 你先看看你电脑上的计算器能不能抗住
by zqw1234 @ 2024-12-18 07:50:05
@liruizhou_lihui你先看看50的阶乘能不能放进去,或你输入个50看看