QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#746891 | #9619. 乘积,欧拉函数,求和 | yzhang# | WA | 9ms | 3696kb | C++23 | 446b | 2024-11-14 15:48:37 | 2024-11-14 15:48:37 |
Judging History
answer
#include<bits/stdc++.h>
#define mod 998244353
using namespace std;
int phi[3005];
int a[2005];
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
for(int i=1;i<=3000;++i){
phi[i]=1;
for(int j=2;j<=i;++j)
if(i%j!=0) ++phi[i];
}
int n,ans=1;
cin>>n;
for(int i=1;i<=n;++i){
cin>>a[i];
ans=1ll*ans*(1+phi[a[i]])%mod;
}
cout<<ans<<'\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 9ms
memory: 3696kb
input:
5 1 6 8 6 2
output:
384
result:
wrong answer 1st lines differ - expected: '892', found: '384'