結果

問題 No.191 供託金
ユーザー tentententen
提出日時 2020-11-10 17:35:06
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 511 bytes
コンパイル時間 2,058 ms
コンパイル使用メモリ 71,792 KB
実行使用メモリ 56,196 KB
最終ジャッジ日時 2023-09-29 23:41:17
合計ジャッジ時間 6,925 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 129 ms
55,744 KB
testcase_02 WA -
testcase_03 AC 127 ms
55,908 KB
testcase_04 AC 137 ms
55,860 KB
testcase_05 AC 137 ms
55,492 KB
testcase_06 AC 139 ms
56,036 KB
testcase_07 AC 138 ms
55,456 KB
testcase_08 AC 131 ms
55,720 KB
testcase_09 AC 133 ms
56,000 KB
testcase_10 AC 137 ms
55,876 KB
testcase_11 AC 132 ms
55,484 KB
testcase_12 AC 131 ms
55,748 KB
testcase_13 AC 139 ms
55,780 KB
testcase_14 AC 139 ms
56,016 KB
testcase_15 AC 137 ms
55,668 KB
testcase_16 AC 135 ms
55,928 KB
testcase_17 AC 135 ms
55,752 KB
testcase_18 AC 134 ms
55,712 KB
testcase_19 AC 138 ms
55,832 KB
testcase_20 AC 138 ms
55,840 KB
testcase_21 AC 135 ms
55,760 KB
testcase_22 AC 134 ms
55,712 KB
testcase_23 AC 136 ms
55,564 KB
testcase_24 AC 133 ms
55,796 KB
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

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