結果
問題 | No.191 供託金 |
ユーザー | ohagi_1182 |
提出日時 | 2017-10-14 18:14:48 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 138 ms / 5,000 ms |
コード長 | 460 bytes |
コンパイル時間 | 2,102 ms |
コンパイル使用メモリ | 74,348 KB |
実行使用メモリ | 41,820 KB |
最終ジャッジ日時 | 2024-11-17 14:45:04 |
合計ジャッジ時間 | 6,372 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc = new Scanner(System.in);int n = sc.nextInt();int[] c = new int[n];for(int i = 0 ; i < n ; i++) c[i] = sc.nextInt();int total = 0;for(int i = 0 ; i < n ; i++) {total += c[i];}double avg = 1.0 * total / 10;int ans = 0;for(int i = 0 ; i < n ; i++) {if(avg >= c[i]) {ans += 30;}}System.out.println(ans);}}