what's wrong in my prog?
Послано
m2m 23 фев 2007 05:04
int main()
{
// freopen("input.txt", "r", stdin);
scanf("%d", &n);
scanf("%s%s", a, b);
FOR(i, n) a[i]-='0',b[i]-='0';
REPD(i, n-1, 0) if(a[i]+b[i]==0 && b[i]==0){
b[i]++;
REP(j, i+1, n-1)b[j]=0;
out();
return 0;
}
REPD(i, n-1, 0)if(a[i]==0){
a[i]=1;
REP(j, i+1, n-1)a[j]=0;
ZERO(b);
out();
return 0;
}
ZERO(a);ZERO(b);
out();
return 0;
}