結果
問題 | No.191 供託金 |
ユーザー |
|
提出日時 | 2019-09-13 14:36:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 573 bytes |
コンパイル時間 | 586 ms |
コンパイル使用メモリ | 70,016 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 22:54:16 |
合計ジャッジ時間 | 1,641 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
#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) { r = v.size() * 30; } else { for (int i = 0; i < n; i++) { if (v[i] / total <= 0.1) { r += 30; } } } cout << r << endl; return 0; }