QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#746973#9627. 算术Qzong#WA 0ms3944kbC++14770b2024-11-14 16:02:022024-11-14 16:02:03

Judging History

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

  • [2024-11-14 16:02:03]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3944kb
  • [2024-11-14 16:02:02]
  • 提交

answer

#include<cstdio>
const int mod=998244353;
int a[11];
#include<queue>
std::priority_queue<int>q;
int main(){
    // freopen("a.in","r",stdin);
    int t;
    scanf("%d",&t);
    while(t--){
        for(int i=1;i<=9;i++)scanf("%d",a+i);
        int flag=0;
        for(int i=2;i<=a[1];i+=2){
            if(a[2]>=2){
                a[3]+=2,a[2]-=2;
            }
            else {
                a[2]++;
            }
        }
        if(a[1]&1){
            for(int i=2;i<=9;i++)if(a[i]){
                a[i]--,a[i+1]++;
                break;
            }
        }
        int ans=1;
        for(int i=2;i<=10;i++){
            for(int j=1;j<=a[i];j++)ans=1ll*ans*i%mod;
        }
        printf("%d\n",ans);
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3944kb

input:

7
5 3 0 0 0 0 0 0 0
4 1 1 1 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 2
99 88 77 66 55 44 33 22 11
100 90 80 70 60 50 40 30 20

output:

54
108
1
10
900
71124023
377815858

result:

wrong answer 5th lines differ - expected: '90', found: '900'