結果

問題 No.191 供託金
ユーザー jimanojimano
提出日時 2016-01-10 15:22:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 5,000 ms
コード長 429 bytes
コンパイル時間 3,031 ms
コンパイル使用メモリ 74,244 KB
実行使用メモリ 41,644 KB
最終ジャッジ日時 2024-04-28 08:17:09
合計ジャッジ時間 7,110 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
41,132 KB
testcase_01 AC 122 ms
41,252 KB
testcase_02 AC 120 ms
41,100 KB
testcase_03 AC 118 ms
41,188 KB
testcase_04 AC 124 ms
41,332 KB
testcase_05 AC 121 ms
41,208 KB
testcase_06 AC 118 ms
41,344 KB
testcase_07 AC 122 ms
41,124 KB
testcase_08 AC 115 ms
41,328 KB
testcase_09 AC 123 ms
40,948 KB
testcase_10 AC 134 ms
41,644 KB
testcase_11 AC 128 ms
41,328 KB
testcase_12 AC 123 ms
41,060 KB
testcase_13 AC 127 ms
41,292 KB
testcase_14 AC 125 ms
41,212 KB
testcase_15 AC 122 ms
40,336 KB
testcase_16 AC 127 ms
41,456 KB
testcase_17 AC 138 ms
41,352 KB
testcase_18 AC 115 ms
40,208 KB
testcase_19 AC 137 ms
41,300 KB
testcase_20 AC 127 ms
41,364 KB
testcase_21 AC 129 ms
41,356 KB
testcase_22 AC 130 ms
41,076 KB
testcase_23 AC 129 ms
41,108 KB
testcase_24 AC 123 ms
41,380 KB
testcase_25 AC 115 ms
39,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No0191 {
	final static int DEPOSIT = 30;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] C = new int[N];
		int vote = 0;
		int sum = 0;
		
		for(int i = 0; i < N; i++){
			C[i] = sc.nextInt();
			vote += C[i];
		}
		
		for(int c : C){
			if (c <= (vote / 10)){
				sum += DEPOSIT;
			}
		}
		System.out.println(sum);
		
	}
}
0