結果

問題 No.1131 Deviation Score
ユーザー GafoGafoGafoGafo
提出日時 2021-02-28 01:09:15
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 414 bytes
コンパイル時間 1,396 ms
コンパイル使用メモリ 32,512 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-10 15:52:31
合計ジャッジ時間 1,547 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
6,816 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 32 ms
6,944 KB
testcase_03 AC 14 ms
6,944 KB
testcase_04 AC 29 ms
6,940 KB
testcase_05 AC 11 ms
6,944 KB
testcase_06 AC 31 ms
6,940 KB
testcase_07 AC 14 ms
6,940 KB
testcase_08 AC 28 ms
6,940 KB
testcase_09 AC 11 ms
6,940 KB
testcase_10 AC 26 ms
6,940 KB
testcase_11 AC 30 ms
6,940 KB
testcase_12 AC 24 ms
6,944 KB
testcase_13 AC 32 ms
6,940 KB
testcase_14 AC 7 ms
6,944 KB
testcase_15 AC 7 ms
6,944 KB
testcase_16 AC 27 ms
6,940 KB
testcase_17 AC 12 ms
6,944 KB
testcase_18 AC 35 ms
6,944 KB
testcase_19 AC 1 ms
6,940 KB
testcase_20 AC 1 ms
6,940 KB
testcase_21 AC 1 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main()
{
	int n;
	int x[100000];
	int sum = 0;
	int i;
	double a;
	double d;

	scanf("%d", &n);

	for(i = 0; i < n; i++)
	{
		scanf("%d", &x[i]);
	}

	for(i = 0; i < n; i++)
	{
		sum = sum + x[i];
	}
	a = (double)sum / (double)n;
	//printf("%f\n", a);

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

	return 0;
}
0