結果

問題 No.1131 Deviation Score
ユーザー GafoGafo
提出日時 2021-02-26 00:35:53
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 367 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 29,184 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-01 15:13:25
合計ジャッジ時間 1,512 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <float.h>

int main()
{
	double n = 0.0;
	double x[100000];
	double s = 0.0;
	double a = 0.0;
	double d = 0.0;

	int i = 0;

	scanf("%lg", &n);

	for(i = 0; i < n; i++)
	{
		scanf("%lg", &x[i]);
		s = s + x[i];
	}
	a = s / n; //誤差?

	for(i = 0; i < n; i++)
	{
		d = 50.0 - ((a - x[i]) / 2.0);
		printf("%.0lg\n", d);
	}

	return 0;
}
0