結果

問題 No.191 供託金
ユーザー Grenache
提出日時 2015-11-03 12:08:59
言語 Java
(openjdk 23)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 571 bytes
コンパイル時間 3,105 ms
コンパイル使用メモリ 75,976 KB
実行使用メモリ 41,532 KB
最終ジャッジ日時 2024-11-16 21:44:43
合計ジャッジ時間 7,117 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder191 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] c = new int[n];
        int sum = 0;
        for (int i = 0; i < n; i++) {
        	c[i] = sc.nextInt();
        	sum += c[i];
        }

        int ret = 0;
        int lim = sum / 10;
        for (int i = 0; i < n; i++) {
        	if (c[i] <= lim) {
        		ret += 30;
        	}
        }
        
        System.out.println(ret);
        
        sc.close();
    }
}
0