結果

問題 No.191 供託金
ユーザー m4s4k1ch1m4s4k1ch1
提出日時 2015-05-28 23:38:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 52 ms / 5,000 ms
コード長 685 bytes
コンパイル時間 1,871 ms
コンパイル使用メモリ 74,540 KB
実行使用メモリ 37,120 KB
最終ジャッジ日時 2024-04-28 07:13:06
合計ジャッジ時間 3,961 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
37,028 KB
testcase_01 AC 48 ms
36,604 KB
testcase_02 AC 47 ms
37,064 KB
testcase_03 AC 48 ms
37,100 KB
testcase_04 AC 50 ms
36,488 KB
testcase_05 AC 52 ms
37,040 KB
testcase_06 AC 49 ms
36,644 KB
testcase_07 AC 49 ms
36,924 KB
testcase_08 AC 52 ms
36,864 KB
testcase_09 AC 51 ms
36,992 KB
testcase_10 AC 51 ms
36,572 KB
testcase_11 AC 49 ms
36,644 KB
testcase_12 AC 50 ms
37,004 KB
testcase_13 AC 50 ms
37,120 KB
testcase_14 AC 48 ms
36,988 KB
testcase_15 AC 50 ms
36,656 KB
testcase_16 AC 50 ms
36,436 KB
testcase_17 AC 52 ms
37,108 KB
testcase_18 AC 48 ms
37,016 KB
testcase_19 AC 48 ms
36,864 KB
testcase_20 AC 48 ms
36,764 KB
testcase_21 AC 50 ms
36,884 KB
testcase_22 AC 48 ms
36,808 KB
testcase_23 AC 50 ms
37,016 KB
testcase_24 AC 50 ms
37,004 KB
testcase_25 AC 50 ms
37,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class Main {
	public static void main(String args[]) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		int n = Integer.parseInt(line);
		line = br.readLine();
		String[] lines = line.split(" ");
		int[] cs = new int[n];
		
		int total = 0;
		int i = 0;
		for (; i < n; i++) {
			cs[i] = Integer.parseInt(lines[i]);
			total += cs[i];
		}
		
		int border = total / 10;
		int res = 0;
		for (int t : cs) {
			if (t <= border) {
				res++;
			}
		}
		System.out.println(res * 30);
	}
}
0