結果

問題 No.191 供託金
ユーザー Ryota EnokidoRyota Enokido
提出日時 2018-12-11 12:47:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 155 ms / 5,000 ms
コード長 681 bytes
コンパイル時間 2,137 ms
コンパイル使用メモリ 74,408 KB
実行使用メモリ 57,736 KB
最終ジャッジ日時 2023-10-21 16:54:58
合計ジャッジ時間 6,734 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
57,436 KB
testcase_01 AC 125 ms
57,468 KB
testcase_02 AC 126 ms
57,636 KB
testcase_03 AC 124 ms
57,152 KB
testcase_04 AC 135 ms
57,624 KB
testcase_05 AC 139 ms
57,684 KB
testcase_06 AC 133 ms
57,412 KB
testcase_07 AC 155 ms
57,084 KB
testcase_08 AC 140 ms
57,600 KB
testcase_09 AC 133 ms
57,652 KB
testcase_10 AC 133 ms
57,420 KB
testcase_11 AC 131 ms
55,836 KB
testcase_12 AC 127 ms
57,580 KB
testcase_13 AC 131 ms
57,100 KB
testcase_14 AC 132 ms
57,604 KB
testcase_15 AC 131 ms
57,592 KB
testcase_16 AC 134 ms
57,736 KB
testcase_17 AC 147 ms
57,532 KB
testcase_18 AC 130 ms
57,416 KB
testcase_19 AC 138 ms
57,640 KB
testcase_20 AC 136 ms
57,660 KB
testcase_21 AC 141 ms
57,436 KB
testcase_22 AC 136 ms
57,640 KB
testcase_23 AC 137 ms
57,568 KB
testcase_24 AC 136 ms
57,636 KB
testcase_25 AC 116 ms
56,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

 import java.util.Scanner;

  public class Main {
      public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
 
          int n = sc.nextInt();
          int[] getVotes = new int[n];
          int sum = 0;
          int depositMoney = 0;
          
          
          for(int i=0; i<n; i++){
              getVotes[i] = sc.nextInt();
              sum += getVotes[i];
          }
          
          int standard = sum / 10;

          for(int j=0; j<n; j++){
              if(getVotes[j]<=standard){
                  depositMoney += 30;
              }
          }
          
          System.out.println(depositMoney);
          
      }
  }
0