結果
| 問題 | No.191 供託金 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-05 20:51:24 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 5,000 ms |
| コード長 | 1,058 bytes |
| 記録 | |
| コンパイル時間 | 2,759 ms |
| コンパイル使用メモリ | 81,256 KB |
| 実行使用メモリ | 45,244 KB |
| 最終ジャッジ日時 | 2025-12-05 20:51:30 |
| 合計ジャッジ時間 | 6,431 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
import java.io.*;
import java.util.*;
import java.util.stream.*;
// 処理
class Process {
private int[] C;
Process(int[] C) {
this.C = C;
}
int getResult() {
int confiscationCriteria = IntStream.of(C).sum() / 10;
int count = 0;
for(var c : C) {
if(c <= confiscationCriteria) {
count++;
}
}
return (30 * count);
}
}
public class Main {
public static void main(String[] args) throws IOException {
var bufferedReader = new BufferedReader(new InputStreamReader(System.in));
var printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
// 入力
int N = Integer.parseInt(bufferedReader.readLine().trim());
int[] C = Stream.of(bufferedReader.readLine().trim().split("[ ]+")).mapToInt(Integer::parseInt).toArray();
// 出力
printWriter.println((new Process(C)).getResult());
bufferedReader.close();
printWriter.close();
}
}