結果

問題 No.191 供託金
ユーザー k_kadorak_kadora
提出日時 2015-06-10 00:18:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 434 bytes
コンパイル時間 3,584 ms
コンパイル使用メモリ 75,088 KB
実行使用メモリ 41,700 KB
最終ジャッジ日時 2024-04-28 07:16:28
合計ジャッジ時間 7,252 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
41,100 KB
testcase_01 AC 123 ms
41,360 KB
testcase_02 AC 106 ms
41,700 KB
testcase_03 AC 109 ms
41,524 KB
testcase_04 AC 133 ms
41,628 KB
testcase_05 AC 124 ms
41,332 KB
testcase_06 AC 123 ms
41,108 KB
testcase_07 AC 130 ms
41,332 KB
testcase_08 AC 118 ms
41,236 KB
testcase_09 AC 118 ms
41,056 KB
testcase_10 AC 127 ms
41,444 KB
testcase_11 AC 122 ms
41,288 KB
testcase_12 AC 121 ms
41,260 KB
testcase_13 AC 121 ms
41,192 KB
testcase_14 AC 130 ms
40,980 KB
testcase_15 AC 127 ms
41,232 KB
testcase_16 AC 125 ms
41,032 KB
testcase_17 AC 135 ms
41,616 KB
testcase_18 AC 111 ms
40,132 KB
testcase_19 AC 128 ms
41,636 KB
testcase_20 AC 123 ms
41,432 KB
testcase_21 AC 141 ms
41,244 KB
testcase_22 AC 125 ms
41,472 KB
testcase_23 AC 125 ms
41,356 KB
testcase_24 AC 125 ms
41,120 KB
testcase_25 AC 122 ms
41,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Kyotaku{
	public static void main(String arg[]){
		int n,sum=0,res=0;
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		int[] c = new int[n];
		for(int i = 0;i<n;i++){
			c[i] = sc.nextInt();
			sum = sum + c[i];
		}
		for(int i = 0;i<n;i++){
			if(sum == 0){
				res = n*30;
				break;
			}
			if((double)c[i]  / (double)sum <= 0.1)res = res + 30;
		}
		System.out.println(res);
	}
}
0