/
spirzen
/
it-code-examples
Обзор
Документация
Войти
/
spirzen
/
it-code-examples
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/cpp/lab-1125-009/main.cpp
34 строки
651 B
Spirzen
Code migration pack
09 июн 2026, 01:41
09 июн 2026, 01:41
cebc284
Код
Авторство
О чём код?
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <map> #include <set> #include <string> #include <numeric> using namespace std; using ll = long long; const ll INF = (1LL << 60); const int MOD = 1'000'000'007; void solve() { int n; cin >> n; vector<int> a(n); for (int &x : a) cin >> x; cout << accumulate(a.begin a.end 0LL) << '\n'; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t = 1; // cin >> t; // раскомментируйте, если в условии несколько тестов while (t--) { solve(); } return 0; }