結果

問題 No.191 供託金
ユーザー spaciaspacia
提出日時 2015-12-16 01:16:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 52 ms / 5,000 ms
コード長 577 bytes
コンパイル時間 2,049 ms
コンパイル使用メモリ 74,680 KB
実行使用メモリ 37,112 KB
最終ジャッジ日時 2024-04-28 08:13:17
合計ジャッジ時間 4,130 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
36,516 KB
testcase_01 AC 51 ms
36,612 KB
testcase_02 AC 50 ms
37,004 KB
testcase_03 AC 49 ms
36,952 KB
testcase_04 AC 51 ms
37,064 KB
testcase_05 AC 51 ms
36,892 KB
testcase_06 AC 52 ms
36,516 KB
testcase_07 AC 51 ms
36,992 KB
testcase_08 AC 51 ms
36,960 KB
testcase_09 AC 50 ms
36,656 KB
testcase_10 AC 50 ms
36,976 KB
testcase_11 AC 50 ms
36,912 KB
testcase_12 AC 48 ms
36,644 KB
testcase_13 AC 51 ms
36,872 KB
testcase_14 AC 50 ms
36,644 KB
testcase_15 AC 51 ms
36,940 KB
testcase_16 AC 51 ms
36,988 KB
testcase_17 AC 51 ms
36,840 KB
testcase_18 AC 51 ms
37,016 KB
testcase_19 AC 49 ms
36,740 KB
testcase_20 AC 51 ms
36,656 KB
testcase_21 AC 51 ms
37,112 KB
testcase_22 AC 51 ms
37,064 KB
testcase_23 AC 51 ms
36,924 KB
testcase_24 AC 49 ms
36,644 KB
testcase_25 AC 50 ms
36,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;
import java.math.*;

class Main191 {
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		String[] str = new String[n];
		str = br.readLine().split(" ");
		int[] nums = new int[n];
		int sum = 0, ans = 0;
		for (int i = 0; i < n; i++) {
			nums[i] = Integer.parseInt(str[i]);
			sum += nums[i];
		}
		for (int m : nums) {
			if (m <= (double)sum / 10.0) ans += 30;
		}
		System.out.println(ans);
	}
}
0