結果

問題 No.191 供託金
ユーザー dazydazy
提出日時 2017-02-23 15:00:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 532 bytes
コンパイル時間 3,432 ms
コンパイル使用メモリ 73,164 KB
実行使用メモリ 56,600 KB
最終ジャッジ日時 2023-08-30 21:24:50
合計ジャッジ時間 7,908 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,680 KB
testcase_01 AC 117 ms
55,756 KB
testcase_02 AC 119 ms
56,060 KB
testcase_03 AC 119 ms
56,140 KB
testcase_04 AC 130 ms
56,316 KB
testcase_05 AC 131 ms
56,336 KB
testcase_06 AC 129 ms
55,600 KB
testcase_07 AC 131 ms
55,720 KB
testcase_08 AC 121 ms
55,824 KB
testcase_09 AC 125 ms
56,112 KB
testcase_10 AC 131 ms
56,344 KB
testcase_11 AC 124 ms
55,920 KB
testcase_12 AC 121 ms
55,872 KB
testcase_13 AC 128 ms
55,964 KB
testcase_14 AC 130 ms
55,828 KB
testcase_15 AC 127 ms
56,120 KB
testcase_16 AC 127 ms
56,304 KB
testcase_17 AC 130 ms
55,612 KB
testcase_18 AC 120 ms
55,672 KB
testcase_19 AC 129 ms
56,600 KB
testcase_20 AC 126 ms
55,756 KB
testcase_21 AC 129 ms
54,288 KB
testcase_22 AC 129 ms
55,724 KB
testcase_23 AC 130 ms
55,420 KB
testcase_24 AC 125 ms
55,348 KB
testcase_25 AC 120 ms
55,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Run {
    public static void main (String arg[]) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int ans = 0;
        int C;
        int sum = 0;
        HashMap<Integer, Integer> M = new HashMap<>();
        for (int i = 0; i < N; i++) {
            C = scan.nextInt();
            M.put(i, C);
            sum += C;
        }
        for (int i = 0; i < N; i++) if (M.get(i) * 10 <= sum) ans++;
        ans *= 30;
        System.out.println(ans);
    }
}
0