結果

問題 No.1131 Deviation Score
ユーザー tenten
提出日時 2020-08-17 22:48:58
言語 Java
(openjdk 23)
結果
AC  
実行時間 594 ms / 2,000 ms
コード長 493 bytes
コンパイル時間 2,384 ms
コンパイル使用メモリ 74,356 KB
実行使用メモリ 59,468 KB
最終ジャッジ日時 2024-06-28 03:48:59
合計ジャッジ時間 12,849 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] arr = new int[n];
		double sum = 0;
		for (int i = 0; i < n; i++) {
		    arr[i] = sc.nextInt();
		    sum += arr[i];
		}
		double mean = sum / n;
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < n; i++) {
		    int ans = (int)(50 - (mean - arr[i]) / 2);
		    sb.append(ans).append("\n");
		}
		System.out.print(sb);
	}
}
0