// BEGIN CUT HERE
void main( int argc, char* argv[] ) {
	{
		TheNumberGameDiv2 theObject;
		eq(0, theObject.minimumMoves(25, 5),2);
	}
	{
		TheNumberGameDiv2 theObject;
		eq(1, theObject.minimumMoves(5162, 16),4);
	}
	{
		TheNumberGameDiv2 theObject;
		eq(2, theObject.minimumMoves(334, 12),-1);
	}
	{
		TheNumberGameDiv2 theObject;
		eq(3, theObject.minimumMoves(218181918, 9181),6);
	}
	{
		TheNumberGameDiv2 theObject;
		eq(4, theObject.minimumMoves( 123456789, 79817),-1);
	}
}
Exemple #2
0
double test0() {
    int p0 = 25;
    int p1 = 5;
    TheNumberGameDiv2 * obj = new TheNumberGameDiv2();
    clock_t start = clock();
    int my_answer = obj->minimumMoves(p0, p1);
    clock_t end = clock();
    delete obj;
    cout <<"Time: " <<(double)(end-start)/CLOCKS_PER_SEC <<" seconds" <<endl;
    int p2 = 2;
    cout <<"Desired answer: " <<endl;
    cout <<"\t" << p2 <<endl;
    cout <<"Your answer: " <<endl;
    cout <<"\t" << my_answer <<endl;
    if (p2 != my_answer) {
        cout <<"DOESN'T MATCH!!!!" <<endl <<endl;
        return -1;
    }
    else {
        cout <<"Match :-)" <<endl <<endl;
        return (double)(end-start)/CLOCKS_PER_SEC;
    }
}
Exemple #3
0
int main()
{
    TheNumberGameDiv2 T;
    cout << T.minimumMoves(25, 5) << endl;
    return 0;
}