QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#746969 | #9627. 算术 | Qzong# | WA | 0ms | 3896kb | C++14 | 769b | 2024-11-14 16:00:42 | 2024-11-14 16:00:42 |
Judging History
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<=9;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: 3896kb
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 1 9 90553232 143532368
result:
wrong answer 4th lines differ - expected: '10', found: '1'