結果

問題 No.1131 Deviation Score
ユーザー warm4C0warm4C0
提出日時 2022-07-28 22:57:24
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 336 bytes
コンパイル時間 1,316 ms
コンパイル使用メモリ 144,536 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-25 16:46:03
合計ジャッジ時間 4,304 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
4,380 KB
testcase_01 AC 4 ms
4,384 KB
testcase_02 AC 123 ms
4,380 KB
testcase_03 AC 56 ms
4,380 KB
testcase_04 AC 114 ms
4,380 KB
testcase_05 AC 44 ms
4,380 KB
testcase_06 AC 123 ms
4,384 KB
testcase_07 AC 59 ms
4,380 KB
testcase_08 AC 107 ms
4,384 KB
testcase_09 AC 40 ms
4,380 KB
testcase_10 AC 102 ms
4,380 KB
testcase_11 AC 104 ms
4,376 KB
testcase_12 AC 92 ms
4,376 KB
testcase_13 AC 121 ms
4,376 KB
testcase_14 AC 27 ms
4,380 KB
testcase_15 AC 27 ms
4,380 KB
testcase_16 AC 111 ms
4,380 KB
testcase_17 AC 44 ms
4,380 KB
testcase_18 AC 139 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
	int n;
	cin >> n;

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

	int total = 0;
	for (int i = 0; i < n; i++) {
		total += x[i];
	}

	double ave = (double)total/(double)n;
	for (int i = 0; i < n; i++) {
		cout << int(50-(ave-x[i])/2) << endl;
	}

	return 0;
}
0