Cod sursa(job #1442536)
Utilizator | Data | 25 mai 2015 19:23:18 | |
---|---|---|---|
Problema | A+B | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream in("adunare.in", ios::in);
ofstream out("adunare.out", ios::out);
int a;
in >> a;
int b;
in >> b;
int max_result = 2000000000;
int long long c = a + b;
if(c > max_result)
out << "oferflow";
else
out << c;
return 0;
}