結果

問題 No.191 供託金
ユーザー Lo_OTLo_OT
提出日時 2018-03-14 22:06:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 549 bytes
コンパイル時間 4,872 ms
コンパイル使用メモリ 71,144 KB
実行使用メモリ 56,456 KB
最終ジャッジ日時 2023-08-19 19:51:46
合計ジャッジ時間 9,668 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
55,772 KB
testcase_01 AC 106 ms
55,888 KB
testcase_02 AC 107 ms
55,848 KB
testcase_03 AC 105 ms
55,724 KB
testcase_04 AC 116 ms
55,716 KB
testcase_05 AC 117 ms
53,544 KB
testcase_06 AC 121 ms
55,588 KB
testcase_07 AC 115 ms
55,840 KB
testcase_08 AC 114 ms
55,696 KB
testcase_09 AC 113 ms
56,092 KB
testcase_10 AC 116 ms
55,932 KB
testcase_11 AC 113 ms
55,584 KB
testcase_12 AC 110 ms
55,852 KB
testcase_13 AC 113 ms
55,584 KB
testcase_14 AC 119 ms
55,592 KB
testcase_15 AC 114 ms
56,436 KB
testcase_16 AC 113 ms
55,596 KB
testcase_17 AC 117 ms
55,700 KB
testcase_18 AC 109 ms
55,852 KB
testcase_19 AC 114 ms
55,760 KB
testcase_20 AC 114 ms
55,928 KB
testcase_21 AC 116 ms
55,608 KB
testcase_22 AC 111 ms
56,156 KB
testcase_23 AC 114 ms
55,620 KB
testcase_24 AC 123 ms
55,824 KB
testcase_25 AC 110 ms
56,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int loops = in.nextInt();
        int sum = 0;
        int[] arr = new int[101];
        
        for(int i=0; i<loops; i++){
            arr[i] += in.nextInt();
            sum += arr[i]; 
        }
        int money = sum / 10;
        int count = 0;
        for(int i=0; i<loops; i++){
            if(arr[i] <= money) count++;
        }
        System.out.println(count * 30);
    }
}
0