結果

問題 No.191 供託金
ユーザー t8m8⛄️t8m8⛄️
提出日時 2015-05-03 22:05:07
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 998 bytes
コンパイル時間 3,306 ms
コンパイル使用メモリ 78,080 KB
実行使用メモリ 41,676 KB
最終ジャッジ日時 2024-11-16 20:31:09
合計ジャッジ時間 7,278 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

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