結果

問題 No.191 供託金
ユーザー mits58mits58
提出日時 2016-06-05 17:38:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 397 bytes
コンパイル時間 1,906 ms
コンパイル使用メモリ 74,152 KB
実行使用メモリ 41,848 KB
最終ジャッジ日時 2024-04-28 08:34:27
合計ジャッジ時間 5,993 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
40,312 KB
testcase_01 AC 100 ms
40,440 KB
testcase_02 AC 103 ms
40,884 KB
testcase_03 AC 107 ms
40,964 KB
testcase_04 AC 120 ms
41,248 KB
testcase_05 AC 124 ms
41,380 KB
testcase_06 AC 120 ms
41,012 KB
testcase_07 AC 120 ms
41,516 KB
testcase_08 AC 113 ms
41,148 KB
testcase_09 AC 106 ms
40,532 KB
testcase_10 AC 123 ms
41,820 KB
testcase_11 AC 115 ms
41,524 KB
testcase_12 AC 103 ms
40,308 KB
testcase_13 AC 107 ms
40,228 KB
testcase_14 AC 123 ms
41,848 KB
testcase_15 AC 122 ms
41,800 KB
testcase_16 AC 117 ms
41,280 KB
testcase_17 AC 120 ms
41,536 KB
testcase_18 AC 113 ms
41,204 KB
testcase_19 AC 117 ms
41,192 KB
testcase_20 AC 128 ms
41,276 KB
testcase_21 AC 126 ms
41,536 KB
testcase_22 AC 134 ms
41,476 KB
testcase_23 AC 128 ms
41,208 KB
testcase_24 AC 117 ms
41,288 KB
testcase_25 AC 98 ms
40,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			int n=sc.nextInt();
			int[] c=new int[n];
			double sum=0;
			for(int i=0;i<n;i++){
				c[i]=sc.nextInt();
				sum+=c[i];
			}
			sum/=10;
			int res=0;
			for(int i=0;i<n;i++){
				if(c[i]<=sum) res+=30;
			}
			System.out.println(res);
		}
	}
}
0