結果

問題 No.191 供託金
ユーザー Kaz_nl
提出日時 2017-08-21 21:28:44
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 299 bytes
コンパイル時間 474 ms
コンパイル使用メモリ 58,976 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 00:54:33
合計ジャッジ時間 1,429 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <numeric>
using namespace std;

int main() {
  int n, ans = 0;
  cin >> n;
  vector<int> a(n);
  for (auto& e : a) cin >> e;
  int b = accumulate(a.begin(), a.end(), 0) / 10;
  for (auto& e : a) {
    if (e <= b) ans += 30;
  }
  cout << ans << endl;
}
0