QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#269715 | #5304. Money Game | Carpe_Diem | RE | 0ms | 0kb | C++20 | 675b | 2023-11-29 21:54:17 | 2023-11-29 21:54:18 |
answer
#include<bits/stdc++.h>
using namespace std;
#define inf 0x3f3f3f3f
typedef long long ll;
typedef pair<ll,ll> PII;
typedef unsigned long long ull;
#define N 1000010
#define M 998244353
// 998244353 1000000007 1073741824
// 无序map unordered_map
int n;
void solve(){
scanf("%d",&n);
ll 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(){
int t=1;
// cin>>t;
while(t--){
solve();
}
system("pause");
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Runtime Error
input:
2 4 2