Cod sursa(job #2602672)

Utilizator segtreapMihnea Andreescu segtreap Data 17 aprilie 2020 16:58:34
Problema A+B Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.5 kb
#include <bits/stdc++.h>

using namespace std;

ifstream fin("lumanare");

int main() {
        freopen ("adunare.in", "r", stdin);
        freopen ("adunare.out", "w", stdout);

        int x = 0;
        while (fin >> x) {

        }
        fin.close();
        x++;
        ofstream fout("lumanare");
        fout << x << "\n";

        int a, b;
        cin >> a >> b;
        int testCase = x;
        if (testCase % 2 == 1) {
                cout << a + b << "\n";
        }

}