結果

問題 No.191 供託金
ユーザー nalinali
提出日時 2019-07-18 22:01:27
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 303 bytes
コンパイル時間 2,032 ms
コンパイル使用メモリ 166,408 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-25 22:41:35
合計ジャッジ時間 3,180 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, sum = 0, ans = 0;
  cin >> n;
  int c[n];
  for (int i = 0; i < n; i++) {
    cin >> c[i];
    sum += c[i];
  }
  int a = sum / 10;
  for (int i = 0; i < n; i++) {
    if (c[i] <= a) ans += 30;
  }
  cout << ans << endl;
  return 0;
}
0