Cod sursa(job #2091417)
| Utilizator | Data | 19 decembrie 2017 18:04:59 | |
|---|---|---|---|
| Problema | A+B | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.64 kb |
#include<cstdio>
using namespace std;
const int DIM=100;
char buffer[DIM];
int cursor=DIM-1;
void read(int &x){
x=0;
while(!(buffer[cursor]>='0' and buffer[cursor]<='9'))
if(++cursor==DIM){
cursor=0;
fread(buffer,1,DIM,stdin);
}
while(buffer[cursor]>='0' and buffer[cursor]<='9'){
x=x*10+buffer[cursor]-'0';
if(++cursor==DIM){
cursor=0;
fread(buffer,1,DIM,stdin);
}
}
}
int main(){
freopen("adunare.in","r",stdin);
freopen("adunare.out","w",stdout);
int a,b;
read(a);
read(b);
printf("%i",a+b);
}
