結果

問題 No.1131 Deviation Score
ユーザー 29da164
提出日時 2020-07-28 09:22:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 184 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 607 ms
コンパイル使用メモリ 74,284 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 03:38:34
合計ジャッジ時間 3,521 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
#include <iomanip>


int main(void){
  using namespace std;
  int n=0, m=0,x[100000];
  double ave=0.0,var=0.0,st=0.0,ans=0.0;

  cin >> n;
  for(int i=0;i<n;i++){
    cin >> x[i];
    ave += (double)x[i];
  }
  cin >> m;

  ave = ave/(double)n;
  for(int i=0;i<n;i++){
    ans = 50 - (ave-x[i])/2.0;
    cout << fixed << setprecision(0) << floor(ans) << endl;
  } 
  return 0;    
}
0