結果

問題 No.191 供託金
ユーザー Ryota EnokidoRyota Enokido
提出日時 2018-12-11 12:46:46
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 679 bytes
コンパイル時間 3,302 ms
コンパイル使用メモリ 74,044 KB
実行使用メモリ 57,756 KB
最終ジャッジ日時 2023-10-21 16:51:56
合計ジャッジ時間 7,035 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 128 ms
57,436 KB
testcase_02 WA -
testcase_03 AC 126 ms
57,400 KB
testcase_04 AC 139 ms
57,512 KB
testcase_05 AC 147 ms
57,416 KB
testcase_06 AC 137 ms
57,096 KB
testcase_07 AC 137 ms
57,524 KB
testcase_08 AC 127 ms
57,192 KB
testcase_09 AC 130 ms
57,536 KB
testcase_10 AC 137 ms
57,624 KB
testcase_11 AC 138 ms
57,436 KB
testcase_12 AC 128 ms
57,152 KB
testcase_13 AC 143 ms
57,664 KB
testcase_14 AC 143 ms
57,756 KB
testcase_15 AC 137 ms
57,616 KB
testcase_16 AC 137 ms
57,632 KB
testcase_17 AC 137 ms
57,624 KB
testcase_18 AC 126 ms
57,544 KB
testcase_19 AC 138 ms
57,628 KB
testcase_20 AC 135 ms
57,696 KB
testcase_21 AC 146 ms
57,688 KB
testcase_22 AC 135 ms
57,704 KB
testcase_23 AC 137 ms
57,552 KB
testcase_24 AC 131 ms
57,396 KB
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

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