結果

問題 No.1131 Deviation Score
ユーザー GafoGafo
提出日時 2021-02-25 23:51:26
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 458 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 225 ms
コンパイル使用メモリ 43,620 KB
最終ジャッジ日時 2026-02-22 06:52:05
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <math.h>

int main()
{
	int n;
	int str[100000];
	int i;
	int sum = 0;
	double a;
	double a1;
	double a2;

	scanf("%d", &n);

	for(i = 0; i < n; i++)
	{
		scanf("%d", &str[i]);
		sum = sum + str[i];
	}
	a = (double)(sum / n);

	for(i = 0; i < n; i++)
	{
		a1 = a1 + (double)((str[i] - a)*(str[i] - a));
	}
	a2 = (double)(a1 / n);

	for(i = 0; i < n; i++)
	{
		printf("%.0f\n", 50 + ((str[i] - a) / sqrt(a2)*10));
	}

	return 0;
}
0