結果

問題 No.191 供託金
ユーザー arito_asuarito_asu
提出日時 2020-07-05 19:18:03
言語 Java
(openjdk 23)
結果
AC  
実行時間 142 ms / 5,000 ms
コード長 528 bytes
コンパイル時間 2,575 ms
コンパイル使用メモリ 74,096 KB
実行使用メモリ 55,912 KB
最終ジャッジ日時 2024-09-22 18:26:52
合計ジャッジ時間 7,099 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

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