1 条题解

  • 1
    @ 2026-8-13 15:20:55
    #include <bits/stdc++.h>
    using namespace std;
    
    int main() {
    	int a, b[999999], c = 0;
    	cin >> a;
    	for (int i = 1; i <= a; i++) {
    		b[i] = 1;
    		for (int j = 1; j <= i; j++) {
    			b[i] *= j;
    		}
    		c += b[i];
    	}
    	cout << c;
    	return 0;
    }
    
    
    
    • 1

    信息

    ID
    29906
    时间
    1000ms
    内存
    256MiB
    难度
    10
    标签
    递交数
    2
    已通过
    2
    上传者