結果

問題 No.191 供託金
ユーザー Konton7
提出日時 2019-11-26 16:10:19
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 382 bytes
コンパイル時間 811 ms
コンパイル使用メモリ 70,656 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-06 21:45:04
合計ジャッジ時間 1,540 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;

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