#include<stdio.h>
int main()
{
int j,sum=0,s=1,n;
scanf("%d",&n);
for(j=1;j<=n;j++)
{
s=s*j;
sum=sum+s;
printf("%d!=%d\n",j,s);
}
printf("1!+2!+…+%d!=%d",n,sum);
return 0;
}
#include<stdio.h>
int main()
{
int j,sum=0,s=1,n;
scanf("%d",&n);
for(j=1;j<=n;j++)
{
s=s*j;
sum=sum+s;
printf("%d!=%d\n",j,s);
}
printf("1!+2!+…+%d!=%d",n,sum);
return 0;
}