結果

問題 No.191 供託金
ユーザー tentententen
提出日時 2020-11-10 17:35:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 512 bytes
コンパイル時間 1,900 ms
コンパイル使用メモリ 72,320 KB
実行使用メモリ 56,304 KB
最終ジャッジ日時 2023-09-29 23:41:24
合計ジャッジ時間 5,956 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
56,272 KB
testcase_01 AC 102 ms
55,648 KB
testcase_02 AC 105 ms
55,756 KB
testcase_03 AC 105 ms
56,044 KB
testcase_04 AC 114 ms
55,880 KB
testcase_05 AC 115 ms
55,944 KB
testcase_06 AC 111 ms
53,792 KB
testcase_07 AC 114 ms
56,168 KB
testcase_08 AC 108 ms
54,144 KB
testcase_09 AC 108 ms
56,052 KB
testcase_10 AC 112 ms
55,856 KB
testcase_11 AC 109 ms
56,068 KB
testcase_12 AC 113 ms
55,924 KB
testcase_13 AC 115 ms
55,396 KB
testcase_14 AC 114 ms
56,304 KB
testcase_15 AC 110 ms
56,084 KB
testcase_16 AC 117 ms
55,896 KB
testcase_17 AC 112 ms
55,932 KB
testcase_18 AC 108 ms
55,856 KB
testcase_19 AC 114 ms
55,904 KB
testcase_20 AC 118 ms
56,152 KB
testcase_21 AC 112 ms
56,036 KB
testcase_22 AC 115 ms
55,856 KB
testcase_23 AC 117 ms
55,904 KB
testcase_24 AC 110 ms
56,244 KB
testcase_25 AC 103 ms
55,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        int sum = 0;
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
            sum += arr[i];
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if (arr[i] * 10 <= sum) {
                ans += 30;
            }
        }
        System.out.println(ans);
    }
}
0