結果

問題 No.191 供託金
ユーザー alchemin
提出日時 2019-09-13 14:33:04
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 531 bytes
コンパイル時間 571 ms
コンパイル使用メモリ 70,016 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-04 03:49:09
合計ジャッジ時間 1,566 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <numeric>

using namespace std;

int main() {
    int n;
    vector<int> v;
    
    cin >> n;
    
    int tmp;
    for (int i = 0; i < n; i++) {
        cin >> tmp;
        v.push_back(tmp);
    }
    
    double total = accumulate(v.begin(), v.end(), 0);
    
    int r = 0;
    if (total != 0)
    {
        for (int i = 0; i < n; i++) {
        if (v[i] / total <= 0.1) {
            r += 30;    
            }
        }    
    }
    
    cout << r << endl;
    
    return 0;
}
0