結果
問題 | No.191 供託金 |
ユーザー | fkwnw3_1243 |
提出日時 | 2017-04-30 11:37:58 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 56 ms / 5,000 ms |
コード長 | 859 bytes |
コンパイル時間 | 2,247 ms |
コンパイル使用メモリ | 74,436 KB |
実行使用メモリ | 50,392 KB |
最終ジャッジ日時 | 2024-09-13 23:31:54 |
合計ジャッジ時間 | 4,552 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import static java.lang.System.in;public class Main {public static void main(String[] args) throws IOException {BufferedReader reader = new BufferedReader(new InputStreamReader(in));int N = Integer.parseInt(reader.readLine());String[] inputs = reader.readLine().split(" ");long[] votes = new long[N];long sum = 0;for (int i = 0; i < N; i++) {long v = Long.parseLong(inputs[i]);votes[i] = v;sum += v;}double criteria = sum/ 10.0;long money = 0;for (int i = 0; i < N; i++) {if (votes[i] > criteria) {} else {money += 30;}}System.out.println(money);}}