为啥不对?求解!!!

P1009 [NOIP1998 普及组] 阶乘之和

hsdqjh @ 2024-07-14 21:29:19

  1. 
    #include <bits/stdc++.h>
    using namespace std;

int main() { int n, s, j; cin >> n; j = 0; s = 1; for (int i = 1 ; i <= n ; i++) { s *= i; j += s; } cout << j << endl; return 0; }


by ForgottenDream @ 2024-07-14 21:30:39

高精度呢


by NullPointerExpection @ 2024-07-14 21:31:02


|