1050: 阶乘的累加和
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int n=cin.nextInt();int x=1;int y=0;for(int i=1;i<=n;i++){
x*=i;y+=x;}System.out.printf("%d",y);}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int n=cin.nextInt();int x=1;int y=0;for(int i=1;i<=n;i++){
x*=i;y+=x;}System.out.printf("%d",y);}
}