結果

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

ソースコード

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 / 10;
	int ans=0;
	for (int i = 0; i < n; i++) {
		if (ave >= c[i]) ans += 30;
	}
	cout << ans << endl;
}

0