結果

問題 No.191 供託金
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-14 18:14:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 460 bytes
コンパイル時間 1,913 ms
コンパイル使用メモリ 70,940 KB
実行使用メモリ 56,132 KB
最終ジャッジ日時 2023-08-11 02:29:43
合計ジャッジ時間 7,298 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,896 KB
testcase_01 AC 125 ms
55,720 KB
testcase_02 AC 124 ms
55,508 KB
testcase_03 AC 123 ms
53,740 KB
testcase_04 AC 133 ms
56,108 KB
testcase_05 AC 134 ms
56,076 KB
testcase_06 AC 132 ms
55,600 KB
testcase_07 AC 135 ms
55,928 KB
testcase_08 AC 125 ms
55,724 KB
testcase_09 AC 130 ms
55,720 KB
testcase_10 AC 133 ms
55,944 KB
testcase_11 AC 128 ms
55,832 KB
testcase_12 AC 127 ms
55,860 KB
testcase_13 AC 132 ms
56,132 KB
testcase_14 AC 133 ms
55,956 KB
testcase_15 AC 132 ms
55,852 KB
testcase_16 AC 129 ms
55,524 KB
testcase_17 AC 134 ms
55,776 KB
testcase_18 AC 127 ms
55,956 KB
testcase_19 AC 135 ms
56,040 KB
testcase_20 AC 130 ms
56,040 KB
testcase_21 AC 135 ms
55,680 KB
testcase_22 AC 133 ms
55,844 KB
testcase_23 AC 133 ms
55,952 KB
testcase_24 AC 129 ms
55,588 KB
testcase_25 AC 124 ms
55,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] c = new int[n];
		for(int i = 0 ; i < n ; i++) c[i] = sc.nextInt();
		int total = 0;
		for(int i = 0 ; i < n ; i++) {
			total += c[i];
		}
		double avg = 1.0 * total / 10;
		int ans = 0;
		for(int i = 0 ; i < n ; i++) {
			if(avg >= c[i]) {
				ans += 30;
			}
		}
		System.out.println(ans);
 	}
}
0