結果

問題 No.191 供託金
ユーザー GrenacheGrenache
提出日時 2015-11-03 12:08:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 571 bytes
コンパイル時間 3,462 ms
コンパイル使用メモリ 74,372 KB
実行使用メモリ 41,484 KB
最終ジャッジ日時 2024-04-28 08:06:35
合計ジャッジ時間 6,383 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
41,068 KB
testcase_01 AC 106 ms
40,816 KB
testcase_02 AC 107 ms
41,252 KB
testcase_03 AC 106 ms
41,076 KB
testcase_04 AC 121 ms
41,484 KB
testcase_05 AC 116 ms
41,472 KB
testcase_06 AC 115 ms
41,232 KB
testcase_07 AC 118 ms
41,400 KB
testcase_08 AC 101 ms
40,252 KB
testcase_09 AC 111 ms
40,908 KB
testcase_10 AC 120 ms
41,456 KB
testcase_11 AC 96 ms
39,960 KB
testcase_12 AC 110 ms
40,252 KB
testcase_13 AC 106 ms
40,188 KB
testcase_14 AC 116 ms
41,000 KB
testcase_15 AC 101 ms
39,920 KB
testcase_16 AC 109 ms
40,204 KB
testcase_17 AC 115 ms
41,116 KB
testcase_18 AC 109 ms
41,116 KB
testcase_19 AC 121 ms
41,412 KB
testcase_20 AC 105 ms
40,112 KB
testcase_21 AC 110 ms
41,160 KB
testcase_22 AC 127 ms
41,416 KB
testcase_23 AC 112 ms
41,088 KB
testcase_24 AC 105 ms
40,584 KB
testcase_25 AC 105 ms
41,472 KB
権限があれば一括ダウンロードができます

ソースコード

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