Cod sursa(job #1167771)
Utilizator | Data | 5 aprilie 2014 21:47:50 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | c | Status | done |
Runda | Arhiva de probleme | Marime | 0.39 kb |
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fout, *fin;
int a,b,c;
fin=fopen("suc.in", "r");
fout=fopen("suc.out", "w");
fscanf(fin, "%d%d", &a, &b);
c=1;
b*=2;
while(b>1){
b--;
c*=2;
}
if(a<c)
fprintf(fout, "%d", c-a);
else
fprintf(fout, "0");
fclose(fin);
fclose(fout);
return 0;
}