import java.util.*;
import com.sun.org.apache.xerces.internal.util.SynchronizedSymbolTable;
public class Demo13 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int jc = 1; // 6!=1*2*3*4*5*6=720
int he = 0;
System.out.println("请输入n的值:");
int n = input.nextInt();
for (int i = 1; i <= n; i++) {
jc *= i; // 1*1=1 1*2=2 2*3=6 6*4=24 24*5=120 120*6=720
he += jc;
}
System.out.println(n + "的阶层是:" + jc);
System.out.println("1!+..." + n + "!的值是:" + he);
}
}