50分求助QAQ,不懂高精度WAAA

P1009 [NOIP1998 普及组] 阶乘之和

WhiteOY @ 2023-09-15 21:22:01


by hexuchen @ 2023-09-15 21:29:13

@WhiteOY 你!代!码!呢!


by _O__o_ @ 2023-09-15 21:31:20

......


by Cryflmind @ 2023-09-15 21:31:22

az……等学了高精度之后再回来做这个题吧


by WhiteOY @ 2023-09-15 21:40:24

@hexuchen 不是很会用洛谷,怎么把代码标记出来啊


by hexuchen @ 2023-09-15 21:41:54

用三个`把代码包裹起来


by hexuchen @ 2023-09-15 21:43:36

@WhiteOY 如

```cpp
#include <iostream>
using namespace std;
int main(){
    cout<<"AC";
   return 0;
}
···

by WhiteOY @ 2023-09-15 21:45:49

@hexuchen


using namespace std;
int main() {
    int n, m = 1, sum = 0;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= i; j++) {
            m *= j;
        }
        sum += m;
        m = 1;
    }
    cout << sum;
    return 0;
}

by hexuchen @ 2023-09-15 21:46:33

@WhiteOY 这道题要用高精度的


by WhiteOY @ 2023-09-15 21:48:08

@hexuchen 学业不精QAQ,不知道怎么搞高精度


|