結果

問題 No.1131 Deviation Score
ユーザー tentententen
提出日時 2020-08-17 22:48:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 512 ms / 2,000 ms
コード長 493 bytes
コンパイル時間 3,330 ms
コンパイル使用メモリ 71,832 KB
実行使用メモリ 60,708 KB
最終ジャッジ日時 2023-09-10 12:28:49
合計ジャッジ時間 13,198 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 297 ms
60,624 KB
testcase_01 AC 193 ms
58,264 KB
testcase_02 AC 462 ms
60,320 KB
testcase_03 AC 364 ms
60,316 KB
testcase_04 AC 489 ms
60,456 KB
testcase_05 AC 380 ms
60,020 KB
testcase_06 AC 498 ms
60,148 KB
testcase_07 AC 367 ms
60,300 KB
testcase_08 AC 439 ms
60,184 KB
testcase_09 AC 337 ms
60,400 KB
testcase_10 AC 460 ms
59,972 KB
testcase_11 AC 456 ms
60,404 KB
testcase_12 AC 455 ms
60,708 KB
testcase_13 AC 512 ms
60,316 KB
testcase_14 AC 280 ms
60,356 KB
testcase_15 AC 282 ms
60,140 KB
testcase_16 AC 481 ms
60,224 KB
testcase_17 AC 331 ms
60,368 KB
testcase_18 AC 497 ms
60,512 KB
testcase_19 AC 163 ms
56,120 KB
testcase_20 AC 126 ms
55,872 KB
testcase_21 AC 125 ms
56,012 KB
権限があれば一括ダウンロードができます

ソースコード

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