QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#269715#5304. Money GameCarpe_DiemRE 0ms0kbC++20675b2023-11-29 21:54:172023-11-29 21:54:18

Judging History

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

  • [2023-11-29 21:54:18]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2023-11-29 21:54:17]
  • 提交

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

output:


result: