結果

問題 No.191 供託金
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-09 17:50:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 417 bytes
コンパイル時間 2,018 ms
コンパイル使用メモリ 74,516 KB
実行使用メモリ 54,372 KB
最終ジャッジ日時 2024-04-16 18:31:51
合計ジャッジ時間 6,483 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
54,140 KB
testcase_01 AC 128 ms
54,308 KB
testcase_02 AC 116 ms
52,932 KB
testcase_03 AC 131 ms
54,140 KB
testcase_04 AC 140 ms
54,056 KB
testcase_05 AC 143 ms
54,120 KB
testcase_06 AC 139 ms
54,160 KB
testcase_07 AC 141 ms
53,976 KB
testcase_08 AC 134 ms
53,992 KB
testcase_09 AC 138 ms
54,372 KB
testcase_10 AC 143 ms
54,132 KB
testcase_11 AC 138 ms
53,960 KB
testcase_12 AC 134 ms
54,200 KB
testcase_13 AC 138 ms
54,120 KB
testcase_14 AC 143 ms
53,976 KB
testcase_15 AC 136 ms
54,052 KB
testcase_16 AC 137 ms
53,972 KB
testcase_17 AC 140 ms
54,324 KB
testcase_18 AC 133 ms
54,220 KB
testcase_19 AC 139 ms
54,148 KB
testcase_20 AC 140 ms
53,988 KB
testcase_21 AC 141 ms
54,116 KB
testcase_22 AC 140 ms
54,356 KB
testcase_23 AC 143 ms
54,356 KB
testcase_24 AC 135 ms
54,296 KB
testcase_25 AC 130 ms
54,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		int[] ar = new int[n];
		int standard = 0;
		for (int i=0; i<n; i++) {
			ar[i] = sc.nextInt();
			standard += ar[i];
		}
		standard /= 10;
		
		int money = 0;
		for (int i=0; i<n; i++) {
			if (ar[i]<=standard) {money++;}
		}
		System.out.println(money*30);
	}
}
0