liyifanglan @ 2024-07-13 15:07:09
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
long long ans = 0;
for (int i = 1; i <= n; i++){
long long sum = 1;
for (int j = 1; j <= i; j++){
sum*=j;
}
ans += sum;
}
cout << ans;
}
by purplepolarstar @ 2024-07-22 15:05:18
@a0o0o 谢谢
by LiuYongHaoLYH @ 2024-07-22 17:16:20
@linjingyi 姐,那你也厉害,还是差点吓死me
by purplepolarstar @ 2024-07-22 18:25:01
@LiuYongHaoLYH 我会继续努力的,感谢表扬
by LiuYongHaoLYH @ 2024-07-22 19:55:39
@linjingyi 加油加油