結果

問題 No.191 供託金
ユーザー bellbell
提出日時 2021-02-16 10:03:09
言語 Java19
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 521 bytes
コンパイル時間 1,931 ms
コンパイル使用メモリ 71,140 KB
実行使用メモリ 58,344 KB
最終ジャッジ日時 2023-10-10 21:50:10
合計ジャッジ時間 6,835 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,696 KB
testcase_01 AC 120 ms
55,924 KB
testcase_02 AC 121 ms
56,196 KB
testcase_03 AC 120 ms
56,120 KB
testcase_04 AC 132 ms
56,456 KB
testcase_05 AC 133 ms
57,932 KB
testcase_06 AC 130 ms
56,120 KB
testcase_07 AC 132 ms
56,536 KB
testcase_08 AC 125 ms
56,272 KB
testcase_09 AC 125 ms
56,056 KB
testcase_10 AC 131 ms
56,056 KB
testcase_11 AC 125 ms
55,968 KB
testcase_12 AC 124 ms
55,924 KB
testcase_13 AC 133 ms
56,372 KB
testcase_14 AC 132 ms
55,816 KB
testcase_15 AC 128 ms
55,852 KB
testcase_16 AC 132 ms
56,216 KB
testcase_17 AC 130 ms
54,288 KB
testcase_18 AC 122 ms
54,440 KB
testcase_19 AC 128 ms
56,300 KB
testcase_20 AC 129 ms
56,236 KB
testcase_21 AC 133 ms
56,676 KB
testcase_22 AC 132 ms
55,852 KB
testcase_23 AC 131 ms
58,344 KB
testcase_24 AC 130 ms
56,200 KB
testcase_25 AC 122 ms
56,420 KB
権限があれば一括ダウンロードができます

ソースコード

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];
        int ans=0;
        int count=0;
        for ( int i=0; i<n; i++){
            c[i]=sc.nextInt();
            ans+=c[i];
        }

        ans=ans/10;

        for(int i=0; i<n; i++){
            if( ans >=c[i]){
                count++;
            }
        }
        System.out.println(30*count);
        sc.close();
	}
}

0