結果
問題 | No.191 供託金 |
ユーザー | spacia |
提出日時 | 2015-12-16 01:16:26 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 49 ms / 5,000 ms |
コード長 | 577 bytes |
コンパイル時間 | 2,098 ms |
コンパイル使用メモリ | 74,564 KB |
実行使用メモリ | 37,040 KB |
最終ジャッジ日時 | 2024-11-16 21:55:06 |
合計ジャッジ時間 | 3,928 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
import java.io.*; import java.util.*; import java.math.*; class Main191 { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] str = new String[n]; str = br.readLine().split(" "); int[] nums = new int[n]; int sum = 0, ans = 0; for (int i = 0; i < n; i++) { nums[i] = Integer.parseInt(str[i]); sum += nums[i]; } for (int m : nums) { if (m <= (double)sum / 10.0) ans += 30; } System.out.println(ans); } }