結果
問題 | No.191 供託金 |
ユーザー |
|
提出日時 | 2020-03-31 20:38:46 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 506 bytes |
コンパイル時間 | 751 ms |
コンパイル使用メモリ | 123,648 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 17:15:12 |
合計ジャッジ時間 | 1,539 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
#include <iostream> #include <numeric> #include <vector> constexpr int C = 30; void solve() { int n; std::cin >> n; std::vector<int> xs(n); for (auto& x : xs) std::cin >> x; int s = std::accumulate(xs.begin(), xs.end(), 0); int ans = 0; for (auto x : xs) { if (x * 10 <= s) ++ans; } std::cout << ans * C << std::endl; } int main() { std::cin.tie(nullptr); std::cout.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }