/*
Namec: base_8.c
Purpose: 求阶乘的和
Author: syt
Date: 2016_01_25
*/
#include<stdio.h>
int main()
{
int n, i, j, total = 0, temp = 1;
scanf("%d", &n);
for(i = 1; i <= n; i++)
{
for(j = 1; j <= i; j++)
temp *= j;
total += temp;
temp = 1;
}
printf("%d\n", total);
return 0;
}
Namec: base_8.c
Purpose: 求阶乘的和
Author: syt
Date: 2016_01_25
*/
#include<stdio.h>
int main()
{
int n, i, j, total = 0, temp = 1;
scanf("%d", &n);
for(i = 1; i <= n; i++)
{
for(j = 1; j <= i; j++)
temp *= j;
total += temp;
temp = 1;
}
printf("%d\n", total);
return 0;
}