結果
問題 | No.191 供託金 |
ユーザー | dazy |
提出日時 | 2017-02-23 15:00:56 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 130 ms / 5,000 ms |
コード長 | 532 bytes |
コンパイル時間 | 3,520 ms |
コンパイル使用メモリ | 77,164 KB |
実行使用メモリ | 54,532 KB |
最終ジャッジ日時 | 2025-01-02 18:28:43 |
合計ジャッジ時間 | 7,786 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
import java.util.*; public class Run { public static void main (String arg[]) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int ans = 0; int C; int sum = 0; HashMap<Integer, Integer> M = new HashMap<>(); for (int i = 0; i < N; i++) { C = scan.nextInt(); M.put(i, C); sum += C; } for (int i = 0; i < N; i++) if (M.get(i) * 10 <= sum) ans++; ans *= 30; System.out.println(ans); } }