Cod sursa(job #1380048)

Utilizator bogdan10bosBogdan Sitaru bogdan10bos Data 6 martie 2015 21:24:30
Problema A+B Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.86 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;

const int buffer = 1 << 13;
int cnt=0;
char buff[buffer];
int x, y;
char s[10005];

int getInt()
{
    int number = 0;
    while(buff[cnt] < '0' || buff[cnt] > '9')
        if(++cnt >= buffer) fread(buff, buffer, 1, stdin), cnt = 0;
    while('0' <= buff[cnt] && buff[cnt] <= '9')
    {
        number = number * 10 + buff[cnt] - '0';
        if(++cnt >= buffer) fread(buff, buffer, 1, stdin), cnt = 0;
    }
    return number;
}

int main()
{
    freopen("adunare.in", "r", stdin);
    freopen("adunare.out", "w", stdout);
    x=getInt();
    //gets(s);
    y=getInt();
    printf("%d", x+y);
    return 0;
}