結果

問題 No.191 供託金
ユーザー koukonkokoukonko
提出日時 2015-12-14 15:36:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 690 bytes
コンパイル時間 2,644 ms
コンパイル使用メモリ 73,636 KB
実行使用メモリ 36,992 KB
最終ジャッジ日時 2024-04-28 08:10:51
合計ジャッジ時間 4,489 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
36,840 KB
testcase_01 AC 43 ms
36,992 KB
testcase_02 AC 41 ms
36,796 KB
testcase_03 AC 43 ms
36,776 KB
testcase_04 AC 43 ms
36,696 KB
testcase_05 AC 43 ms
36,784 KB
testcase_06 AC 40 ms
36,848 KB
testcase_07 AC 42 ms
36,868 KB
testcase_08 AC 42 ms
36,876 KB
testcase_09 AC 41 ms
36,656 KB
testcase_10 AC 42 ms
36,656 KB
testcase_11 AC 40 ms
36,840 KB
testcase_12 AC 40 ms
36,720 KB
testcase_13 AC 42 ms
36,780 KB
testcase_14 AC 41 ms
36,836 KB
testcase_15 AC 42 ms
36,452 KB
testcase_16 AC 41 ms
36,828 KB
testcase_17 AC 40 ms
36,900 KB
testcase_18 AC 41 ms
36,764 KB
testcase_19 AC 42 ms
36,784 KB
testcase_20 AC 42 ms
36,764 KB
testcase_21 AC 44 ms
36,624 KB
testcase_22 AC 42 ms
36,824 KB
testcase_23 AC 42 ms
36,836 KB
testcase_24 AC 42 ms
36,432 KB
testcase_25 AC 42 ms
36,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
		try {
			int N = Integer.parseInt(read.readLine());
			String[] box = read.readLine().split(" ");
			int[] v = new int[N];
			int total = 0;
			for (int i = 0; i < N; ++i) {
				v[i] = Integer.parseInt(box[i]);
				total += v[i];
			}

			int border = total / 10;
			int count = 0;
			for (int i = 0; i < N; ++i) {
				if (v[i] <= border) {
					++count;
				}
			}

			System.out.println(count * 30);

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
0