Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define SZ(v) ((int)(v.size()))
- #include <ext/pb_ds/assoc_container.hpp>
- #include <ext/pb_ds/tree_policy.hpp>
- using namespace __gnu_pbds;
- template<class T> using indexed_set = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
- constexpr int N = 52;
- constexpr int mod = 1e9+7;
- void run () {
- string line;
- int sum, value;
- do
- {
- if (!getline(cin, line) || line.empty())
- break;
- istringstream iss(line);
- sum = 0;
- while (iss >> value)
- sum += value;
- cout << "sum : " << sum << endl;
- }
- while (true);
- }
- int main() {
- ios_base::sync_with_stdio(false);
- cin.tie(nullptr);
- cout.tie(nullptr);
- // freopen("/home/hamoudi/Coding/run.in", "r", stdin);
- int tt = 1;
- cin >> tt;
- while (tt--)
- run();
- return 0;
- }
Add Comment
Please, Sign In to add comment