結果

問題 No.191 供託金
ユーザー tenten
提出日時 2020-11-10 17:35:06
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 511 bytes
コンパイル時間 2,297 ms
コンパイル使用メモリ 74,420 KB
実行使用メモリ 53,756 KB
最終ジャッジ日時 2024-07-22 17:36:43
合計ジャッジ時間 5,708 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 21 WA * 2
権限があれば一括ダウンロードができます

ソースコード

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