QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#142272#1373. Rating ProblemsA3bat_team_f_Masr#Compile Error//C++14323b2023-08-18 21:19:312023-08-18 21:19:31

Judging History

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

  • [2023-08-18 21:19:31]
  • 评测
  • [2023-08-18 21:19:31]
  • 提交

answer

#include <iostream>

using namespace std;

int main()
{
    int n,k;
    cin>>n>>k;
    double sum=0;
    for(int i=0;i<k;i++)
    {
        int x;
        cin>>x;
        sum+=x;
    }
    double tmp1=sum+(n-k)*3,tmp2=sum-(n-k)*3;
    cout<<fixed<<setprecision(10)<<tmp2/n<<" "<<tmp1/n;
    return 0;
}

Details

answer.code: In function ‘int main()’:
answer.code:17:18: error: ‘setprecision’ was not declared in this scope
   17 |     cout<<fixed<<setprecision(10)<<tmp2/n<<" "<<tmp1/n;
      |                  ^~~~~~~~~~~~