public class ww{
public static void main (String [] args){
int i,j,num;
int sum=0;
for(i=1;i<20;i++){
long num=1;
for(j=1;j<=i;j++){
num*=j;
}
sum+=num;
}
System.out.println("阶乘之和为:"+sum);
}
}
public class ww{
public static void main (String [] args){
int i,j,num;
int sum=0;
for(i=1;i<20;i++){
long num=1;
for(j=1;j<=i;j++){
num*=j;
}
sum+=num;
}
System.out.println("阶乘之和为:"+sum);
}
}