結果

問題 No.191 供託金
ユーザー arito_asuarito_asu
提出日時 2020-07-05 19:18:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 5,000 ms
コード長 528 bytes
コンパイル時間 3,631 ms
コンパイル使用メモリ 73,916 KB
実行使用メモリ 57,668 KB
最終ジャッジ日時 2023-10-24 01:28:16
合計ジャッジ時間 9,016 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
57,388 KB
testcase_01 AC 129 ms
57,300 KB
testcase_02 AC 129 ms
57,636 KB
testcase_03 AC 117 ms
54,220 KB
testcase_04 AC 138 ms
57,632 KB
testcase_05 AC 141 ms
57,620 KB
testcase_06 AC 136 ms
57,332 KB
testcase_07 AC 140 ms
57,580 KB
testcase_08 AC 134 ms
57,396 KB
testcase_09 AC 134 ms
57,032 KB
testcase_10 AC 140 ms
57,092 KB
testcase_11 AC 133 ms
57,360 KB
testcase_12 AC 133 ms
57,668 KB
testcase_13 AC 139 ms
57,624 KB
testcase_14 AC 139 ms
57,636 KB
testcase_15 AC 142 ms
57,580 KB
testcase_16 AC 137 ms
57,100 KB
testcase_17 AC 140 ms
57,332 KB
testcase_18 AC 132 ms
57,496 KB
testcase_19 AC 141 ms
57,596 KB
testcase_20 AC 140 ms
57,652 KB
testcase_21 AC 138 ms
57,060 KB
testcase_22 AC 140 ms
57,580 KB
testcase_23 AC 139 ms
57,376 KB
testcase_24 AC 135 ms
57,608 KB
testcase_25 AC 128 ms
57,276 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 sum = 0;
        for (int v : c) {
            sum += v;
        }
        int ans = 0;
        for (int p : c) {
            if (p <= sum / 10) {
                ans += 30;
            }
        }
        System.out.println(ans);
    }
}
0