結果
| 問題 |
No.369 足し間違い
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-23 11:04:23 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 484 bytes |
| コンパイル時間 | 3,067 ms |
| コンパイル使用メモリ | 278,008 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-09-23 11:04:28 |
| 合計ジャッジ時間 | 4,072 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
[[nodiscard]] static inline constexpr int_fast32_t solve(const int_fast32_t N, const std::vector<int_least32_t>& A, const int_fast32_t v) noexcept
{
return std::accumulate(A.begin(), A.end(), INT32_C(0)) - v;
}
int main()
{
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
int_fast32_t N, v;
std::cin >> N;
std::vector<int_least32_t> A(N);
for (auto& a : A) std::cin >> a;
std::cin >> v;
std::cout << solve(N, A, v) << '\n';
return 0;
}