結果

問題 No.191 供託金
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-14 18:06:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 450 bytes
コンパイル時間 2,071 ms
コンパイル使用メモリ 71,868 KB
実行使用メモリ 58,100 KB
最終ジャッジ日時 2023-10-11 12:44:16
合計ジャッジ時間 6,414 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
58,100 KB
testcase_01 AC 122 ms
55,952 KB
testcase_02 AC 121 ms
56,200 KB
testcase_03 AC 120 ms
55,864 KB
testcase_04 AC 130 ms
55,804 KB
testcase_05 AC 130 ms
55,640 KB
testcase_06 AC 131 ms
54,120 KB
testcase_07 AC 132 ms
56,284 KB
testcase_08 AC 122 ms
55,840 KB
testcase_09 AC 126 ms
55,648 KB
testcase_10 AC 130 ms
56,060 KB
testcase_11 AC 126 ms
55,600 KB
testcase_12 AC 125 ms
55,516 KB
testcase_13 AC 133 ms
56,060 KB
testcase_14 AC 131 ms
56,064 KB
testcase_15 AC 129 ms
55,620 KB
testcase_16 AC 126 ms
55,520 KB
testcase_17 AC 130 ms
55,948 KB
testcase_18 AC 123 ms
56,000 KB
testcase_19 AC 133 ms
55,900 KB
testcase_20 AC 130 ms
55,684 KB
testcase_21 AC 129 ms
55,844 KB
testcase_22 AC 132 ms
56,556 KB
testcase_23 AC 133 ms
55,912 KB
testcase_24 AC 133 ms
56,004 KB
testcase_25 AC 122 ms
55,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		//総和の10分の1以下のものを足す
		
		int n = sc.nextInt();
		int sum = 0;
		int[] ar = new int[n];
		for (int i=0; i<n; i++) {
			int temp = sc.nextInt();
			ar[i] = temp;
			sum += temp;
		}
		
		int ans = 0;
		for (int i=0; i<n; i++) {
			if (ar[i] <= sum/10) ans += 30;
		}
		System.out.println(ans);
		
	}
}
0