DreamGeorgeNotFound @ 2023-02-19 20:19:26
3!不是3×2×1吗,不是6吗,为啥题目说是9啊?????
by ud2_ @ 2023-02-19 20:20:20
(1) + (1 × 2) + (1 × 2 × 3) 确实是 9。
by TheSky233 @ 2023-02-19 20:22:15
不是求
by DreamGeorgeNotFound @ 2023-02-19 20:24:42
@ud2_ 哦,谢谢
by DreamGeorgeNotFound @ 2023-02-19 20:51:55
#include <bits/stdc++.h>
using namespace std;
int main() {
unsigned long long a,ans=1,ans2=1;
cin>>a;
for(int i=a;i>0;i--){
ans*=i;
for(int j=i-1;j>0;j--){
ans2*=j;
}
ans=ans+ans2;
}
cout<<ans;
return 0;
}
6,我都套两层了还是不行,输入三给我输出14,CPU给我干烧了