結果

問題 No.191 供託金
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-04-30 11:37:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 859 bytes
コンパイル時間 2,021 ms
コンパイル使用メモリ 71,340 KB
実行使用メモリ 49,816 KB
最終ジャッジ日時 2023-10-11 23:33:35
合計ジャッジ時間 4,522 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,660 KB
testcase_01 AC 43 ms
49,288 KB
testcase_02 AC 43 ms
49,816 KB
testcase_03 AC 43 ms
49,328 KB
testcase_04 AC 45 ms
49,344 KB
testcase_05 AC 45 ms
49,356 KB
testcase_06 AC 44 ms
49,680 KB
testcase_07 AC 45 ms
49,324 KB
testcase_08 AC 42 ms
49,336 KB
testcase_09 AC 43 ms
49,412 KB
testcase_10 AC 44 ms
49,512 KB
testcase_11 AC 44 ms
49,188 KB
testcase_12 AC 44 ms
49,456 KB
testcase_13 AC 45 ms
49,360 KB
testcase_14 AC 45 ms
49,676 KB
testcase_15 AC 44 ms
49,132 KB
testcase_16 AC 44 ms
49,336 KB
testcase_17 AC 45 ms
49,336 KB
testcase_18 AC 44 ms
49,192 KB
testcase_19 AC 45 ms
49,340 KB
testcase_20 AC 43 ms
49,304 KB
testcase_21 AC 45 ms
49,308 KB
testcase_22 AC 45 ms
49,376 KB
testcase_23 AC 44 ms
49,444 KB
testcase_24 AC 44 ms
49,180 KB
testcase_25 AC 44 ms
49,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

import static java.lang.System.in;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        int N = Integer.parseInt(reader.readLine());
        String[] inputs = reader.readLine().split(" ");
        long[] votes = new long[N];
        long sum = 0;
        for (int i = 0; i < N; i++) {
            long v = Long.parseLong(inputs[i]);
            votes[i] = v;
            sum += v;
        }
        double criteria = sum/ 10.0;
        long money = 0;
        for (int i = 0; i < N; i++) {
            if (votes[i] > criteria) {

            } else {
                money += 30;
            }
        }
        System.out.println(money);
    }
}
0