結果

問題 No.191 供託金
ユーザー ぴろずぴろず
提出日時 2015-04-26 22:02:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 402 bytes
コンパイル時間 5,066 ms
コンパイル使用メモリ 70,728 KB
実行使用メモリ 57,456 KB
最終ジャッジ日時 2023-08-10 13:50:01
合計ジャッジ時間 8,873 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,488 KB
testcase_01 AC 119 ms
55,332 KB
testcase_02 AC 119 ms
56,032 KB
testcase_03 AC 121 ms
56,184 KB
testcase_04 AC 125 ms
56,384 KB
testcase_05 AC 126 ms
55,880 KB
testcase_06 AC 126 ms
56,044 KB
testcase_07 AC 127 ms
55,692 KB
testcase_08 AC 121 ms
55,604 KB
testcase_09 AC 121 ms
55,780 KB
testcase_10 AC 130 ms
55,708 KB
testcase_11 AC 122 ms
56,176 KB
testcase_12 AC 122 ms
57,456 KB
testcase_13 AC 125 ms
55,700 KB
testcase_14 AC 129 ms
53,748 KB
testcase_15 AC 125 ms
56,196 KB
testcase_16 AC 126 ms
56,088 KB
testcase_17 AC 128 ms
55,608 KB
testcase_18 AC 121 ms
55,916 KB
testcase_19 AC 126 ms
56,224 KB
testcase_20 AC 123 ms
55,788 KB
testcase_21 AC 129 ms
56,204 KB
testcase_22 AC 127 ms
56,156 KB
testcase_23 AC 130 ms
56,020 KB
testcase_24 AC 120 ms
55,640 KB
testcase_25 AC 118 ms
53,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no191;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int sum = 0;
		int[] c = new int[n];
		for(int i=0;i<n;i++) {
			c[i] = sc.nextInt();
			sum += c[i];
		}
		long ans = 0;
		for(int i=0;i<n;i++) {
			if (c[i] * 10 <= sum) {
				ans += 30;
			}
		}
		System.out.println(ans);
	}

}
0