QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#746891#9619. 乘积,欧拉函数,求和yzhang#WA 9ms3696kbC++23446b2024-11-14 15:48:372024-11-14 15:48:37

Judging History

你现在查看的是最新测评结果

  • [2024-11-14 15:48:37]
  • 评测
  • 测评结果:WA
  • 用时:9ms
  • 内存:3696kb
  • [2024-11-14 15:48:37]
  • 提交

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;
}

詳細信息

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'