結果

問題 No.1131 Deviation Score
ユーザー kikagekikage
提出日時 2020-10-06 16:38:04
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 817 ms
コンパイル使用メモリ 33,508 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-10 12:32:20
合計ジャッジ時間 2,188 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 18 ms
4,380 KB
testcase_03 AC 9 ms
4,380 KB
testcase_04 AC 17 ms
4,380 KB
testcase_05 AC 7 ms
4,380 KB
testcase_06 AC 19 ms
4,376 KB
testcase_07 AC 9 ms
4,376 KB
testcase_08 AC 16 ms
4,380 KB
testcase_09 AC 7 ms
4,380 KB
testcase_10 AC 16 ms
4,380 KB
testcase_11 AC 16 ms
4,380 KB
testcase_12 AC 14 ms
4,376 KB
testcase_13 AC 18 ms
4,380 KB
testcase_14 AC 5 ms
4,376 KB
testcase_15 AC 5 ms
4,376 KB
testcase_16 AC 16 ms
4,384 KB
testcase_17 AC 7 ms
4,376 KB
testcase_18 AC 21 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cmath>
int main(){
    int N;
    double x[100000],sum=0;
    scanf("%d",&N);
    for(int i=0;i<N;i++){
        scanf("%lf",&x[i]);
        sum+=x[i];
    }
    double ave=sum/N;
    for(int i=0;i<N;i++){
        int d=floor(50.0-(ave-x[i])/2.0);
        printf("%d\n",d);
        sum+=x[i];
    }
    return 0;
}
0