QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#588548 | #5304. Money Game | louhao088# | WA | 0ms | 3908kb | C++23 | 598b | 2024-09-25 13:04:18 | 2024-09-25 13:04:19 |
Judging History
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==1){printf("%.6Lf ",sum*2);}
else printf("%.6Lf ",sum);
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3908kb
input:
2 4 2
output:
4.000000 4.000000
result:
wrong answer 2nd numbers differ - expected: '2.0000000', found: '4.0000000', error = '1.0000000'