結果

問題 No.191 供託金
ユーザー ruase_
提出日時 2025-08-15 01:42:02
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 440 bytes
コンパイル時間 1,245 ms
コンパイル使用メモリ 102,644 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-08-15 01:42:05
合計ジャッジ時間 2,474 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

# include <iostream>
# include <iomanip>
# include <algorithm>

using namespace std;


int main()
{
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];

    int sum = 0;
    for (int i = 0; i < n; i++) {
        sum += a[i];
    }

    int line = sum / 10;
    sort(a, a+n);
    int i = 0;
    int money = 0;
    while (line >= a[i]) {
        money += 30;
        i++;
    }
    cout << money << endl;




}
0