import java.util.Scanner; public class 阶乘之和 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int [] sum = new int [101]; int [] num = new int [101]; num[1]=1; for (int i = 1; i <=n; i++) { int a=0,…