結果

問題 No.191 供託金
ユーザー t8m8⛄️t8m8⛄️
提出日時 2015-05-03 22:05:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 148 ms / 5,000 ms
コード長 998 bytes
コンパイル時間 3,521 ms
コンパイル使用メモリ 78,640 KB
実行使用メモリ 56,024 KB
最終ジャッジ日時 2024-04-28 07:09:28
合計ジャッジ時間 8,167 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
53,944 KB
testcase_01 AC 135 ms
53,900 KB
testcase_02 AC 139 ms
53,340 KB
testcase_03 AC 135 ms
53,904 KB
testcase_04 AC 145 ms
54,036 KB
testcase_05 AC 144 ms
53,768 KB
testcase_06 AC 146 ms
53,968 KB
testcase_07 AC 147 ms
54,032 KB
testcase_08 AC 139 ms
53,856 KB
testcase_09 AC 141 ms
53,740 KB
testcase_10 AC 145 ms
54,024 KB
testcase_11 AC 139 ms
53,464 KB
testcase_12 AC 137 ms
53,628 KB
testcase_13 AC 142 ms
53,992 KB
testcase_14 AC 147 ms
53,656 KB
testcase_15 AC 143 ms
56,024 KB
testcase_16 AC 137 ms
53,924 KB
testcase_17 AC 146 ms
54,004 KB
testcase_18 AC 134 ms
53,872 KB
testcase_19 AC 144 ms
54,052 KB
testcase_20 AC 145 ms
53,744 KB
testcase_21 AC 145 ms
54,084 KB
testcase_22 AC 143 ms
53,980 KB
testcase_23 AC 148 ms
53,948 KB
testcase_24 AC 140 ms
54,036 KB
testcase_25 AC 135 ms
53,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//No.191 供託金

import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;

public class No0191 {
    
    static final Scanner in = new Scanner(System.in);
    static final PrintWriter out = new PrintWriter(System.out,false);

    static void solve() {
        int n = in.nextInt();
        int[] c = new int[n];
        long sum = 0;
        for (int i=0; i<n; i++) {
            c[i] = in.nextInt();
            sum += c[i];
        }

        double x = (double)sum/10;
        int cnt = 0;
        for (int i=0; i<n; i++) {
            if (c[i] <= x) cnt++;
        }
        out.println(cnt*30);
    }

    public static void main(String[] args) {
        long start = System.currentTimeMillis();

        solve();
        out.flush();

        long end = System.currentTimeMillis();
        //trace(end-start + "ms");
        in.close();
        out.close();
    }

    static void trace(Object... o) { System.out.println(deepToString(o));}
}
0