Beispiel #1
0
int main(void) {
/*
	for (int i = 0; i < 100; i ++) {
		printf("%d %d" , i, com(i));
	}
	cout << endl;
*/
	TheSquareRootDilemma a;
	cout <<a.countPairs(100,100) << endl;
	return 0 ;
}
Beispiel #2
0
int test53() {
    int N = 70000;
    int M = 70000;
    TheSquareRootDilemma* pObj = new TheSquareRootDilemma();
    clock_t start = clock();
    int result = pObj->countPairs(N, M);
    clock_t end = clock();
    delete pObj;
    int expected = 484684;
    if(result == expected) {
        cout << "Test Case 53: Passed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 0;
    } else {
        cout << "Test Case 53: Failed! Time: " << static_cast<double>(end-start)/CLOCKS_PER_SEC << " seconds" << endl;
        return 1;
    }
}