Cod sursa(job #1503684)

Utilizator bogdan10bosBogdan Sitaru bogdan10bos Data 16 octombrie 2015 18:58:47
Problema A+B Scor 100
Compilator cpp Status done
Runda test193120947281 Marime 1.09 kb
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <deque>
 
#define INF (1<<30)
#define mod 666013
 
using namespace std;
 
int a, b;
 
class Reader
{
private:
    int buffer, cnt;
    char buff[20005];
 
public:
    Reader()
    {
        buffer = 1 << 13;
        cnt = buffer - 1;
    }
 
    char gChar()
    {
        if(++cnt == buffer)
        {
            fread(buff, buffer, 1, stdin);
            cnt = 0;
        }
 
        return buff[cnt];
    }
 
    int gInt()
    {
        int nr = 0;
        char ch = gChar();
        while(ch < '0' || '9' < ch)
            ch = gChar();
 
        while('0' <= ch && ch <= '9')
        {
            nr = nr * 10 + ch - '0';
            ch = gChar();
        }
        return nr;
    }
 
};
 
Reader rdr;
 
int main()
{
    freopen("adunare.in", "r", stdin);
    freopen("adunare.out", "w", stdout);
 
    a = rdr.gInt();
    b = rdr.gInt();
 
    printf("%d", a + b);
 
    return 0;
}