結果

問題 No.191 供託金
ユーザー Eclair1015
提出日時 2018-08-09 00:23:56
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 370 bytes
コンパイル時間 549 ms
コンパイル使用メモリ 61,264 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-23 04:16:27
合計ジャッジ時間 1,451 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 3 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include<string>

using namespace std;
int main(){
	int n;
	cin >> n;
	vector<int> c(n);
	for (int i = 0; i < n; i++) cin >> c[i];
	
	int sum = 0;
	for (int i = 0; i < n; i++) sum += c[i];

	int ave = sum / n;
	int ans=0;
	for (int i = 0; i < n; i++) {
		if (ave >= c[i]) ans += 30;
	}
	cout << ans << endl;
}

0