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,…
题目链接:https://www.luogu.org/problemnew/show/P1009 题意:给一个整数n(n<50),求$ \sum^{n}_{i=1} i! $ 题解:我..拿py水的..主要是今天想练练python,后面再更C++的解法吧.(咕咕咕) 代码: n = input() n = int(n) ans = 0 for i in range(1,n+1,1): sum = 1 for j in range(1,i+1,1): sum *= j ans += sum pri…