JJRjjr1018 @ 2024-12-31 18:05:12
请大佬调教
#include <bits/stdc++.h>
using namespace std;
unsigned long long l;
void po(long long n){
unsigned long long x=1;
for(int i=n;i>=1;i--){
unsigned long long x=1;
for(int m=i;m>=1;m--){
x=x*m;
}
l=l+x;
}
cout<<l;
}
int main() {
unsigned long long n;
cin>>n;
po(n);
return 0;
}
by b__b @ 2024-12-31 18:07:17
这是高精度题,你用unsigned long long存绝对溢出