## 试题 A :双阶乘
从 1加到 2021,因为是双阶乘,所以每次加 2,因要保留 5位所以模 100000。
```cpp
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll ans=1;
int main(){
for(int i=1;i<=2021;i+=2) ans=ans*i%100000;
cout<<ans;
return 0;
}
最后得出答案为:59375。
双重循环,暴力枚举 x 和 y 的位置。
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll ans;
int main(){
for(int i=1;i<=2021;i++){
for(int j=1;j<=2021;j++){
if(i*j<=2021) ans++;
}
}
cout<<ans;
return 0;
}
最后得出答案为:15698。
暴力枚举四重循环,最后一个数不用枚举,直接可以依据前 4个数算出。
最后得出答案为:691677274345。
最小生成树,然后枚举每一个的权值,加起来。
最后得出答案为:691677274345。
递推,每个 n 都要找到对应的因数,这样乘积就会等于 n 。
最后得出答案为:1352184317599。