QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#334448 | #5304. Money Game | 552Hz | WA | 0ms | 3940kb | C++14 | 511b | 2024-02-21 23:13:49 | 2024-02-21 23:13:50 |
Judging History
answer
#include<iostream>
const int N=1e6+10;
double a[N];
int n;
int main(){
std::ios::sync_with_stdio(0);
std::cin.tie(0);std::cout.tie(0);
std::cin>>n;
double sum=0;
for(int i=1;i<=n;i++){
std::cin>>a[i];
sum+=a[i];
}
sum/=n+1;
for(int i=1;i<=n;i++){
a[i]=sum;
}
int x=0;
for(int i=1;i<=1024;i++){
x=(x*2022)%n;
}
a[x+1]+=sum;
for(int i=1;i<=n;i++){
std::cout<<a[i]<<" ";
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3940kb
input:
2 4 2
output:
4 2
result:
ok 2 numbers
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3860kb
input:
2 2 3
output:
3.33333 1.66667
result:
wrong answer 2nd numbers differ - expected: '1.6666667', found: '1.6666700', error = '0.0000020'