ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1607. Taxi

I ask you for some attantion with WA 4 in C++ programm
Posted by Alen Pelin 15 Apr 2008 20:12
Here is my code:
#include <iostream>
using namespace std;
void main()
{    int a,da,b,db;
    cin >> a >> da >> b >> db;
    while(a<b)
    {    if(a>=b)
        {    cout << a;
            return;
        }
        a+=da;
        if(a>=b)
        {    cout << a;
            return;
        }
        b-=db;
    }
    cout <<  a;
}

What could be wrong in my code that it dont work in test #4?
Thanks a lot.