QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#588538#5304. Money Gamelouhao088#WA 0ms3972kbC++23598b2024-09-25 12:58:142024-09-25 12:58:14

Judging History

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

  • [2024-09-25 12:58:14]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3972kb
  • [2024-09-25 12:58:14]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int maxn=1e6+5;
#define int long long
int n,m,a[maxn];
int Pow(int x,int y){
    int res=1;x=x%n;
    while(y){
        if(y&1){res=res*x%n;}
        x=x*x%n;y=y/2;
    }return res;
}
long double b[maxn],sum=0;
signed main(){
    scanf("%lld",&n);
    for(int i=1;i<=n;i++){
        scanf("%Lf",&b[i]);
        sum+=b[i];
    }
    int o=Pow(2022,1204);
    sum=1.0*sum/(n+1);
   // cout<<sum<<endl;
    o++;
    for(int i=1;i<=n;i++){
        if(o==i){printf("%.6Lf ",sum*2);}
        else printf("%.6Lf ",sum);
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3904kb

input:

2
4 2

output:

4.000000 2.000000 

result:

ok 2 numbers

Test #2:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

2
2 3

output:

3.333333 1.666667 

result:

ok 2 numbers

Test #3:

score: 0
Accepted
time: 0ms
memory: 3972kb

input:

2
851648 722281

output:

1049286.000000 524643.000000 

result:

ok 2 numbers

Test #4:

score: 0
Accepted
time: 0ms
memory: 3912kb

input:

3
450762 114467 367746

output:

466487.500000 233243.750000 233243.750000 

result:

ok 3 numbers

Test #5:

score: 0
Accepted
time: 0ms
memory: 3920kb

input:

4
2 3 5 1

output:

4.400000 2.200000 2.200000 2.200000 

result:

ok 4 numbers

Test #6:

score: -100
Wrong Answer
time: 0ms
memory: 3908kb

input:

5
616288 155735 783782 648639 349827

output:

425711.833333 851423.666667 425711.833333 425711.833333 425711.833333 

result:

wrong answer 1st numbers differ - expected: '851423.6666667', found: '425711.8333330', error = '0.5000000'