QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#269719 | #5304. Money Game | Carpe_Diem | RE | 0ms | 0kb | C++20 | 394b | 2023-11-29 21:56:26 | 2023-11-29 21:56:26 |
answer
#include<bits/stdc++.h>
using namespace std;
int n;
void solve(){
scanf("%d",&n);
long long sum=0;
for(int i=1;i<=n;i++){
int u;
scanf("%lld",&u);
sum+=u;
}
double ans=(double)sum/(n+1);
printf("%.7lf ",ans*2);
for(int i=1;i<n;i++)printf("%.7lf ",ans);printf("\n");
}
int main(){
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Runtime Error
input:
2 4 2