예제 #1
0
bool do_test(int K, int T, int __expected) {
    time_t startClock = clock();
    KitayutaMart2 *instance = new KitayutaMart2();
    int __result = instance->numBought(K, T);
    double elapsed = (double)(clock() - startClock) / CLOCKS_PER_SEC;
    delete instance;

    if (__result == __expected) {
        cout << "PASSED!" << " (" << elapsed << " seconds)" << endl;
        return true;
    }
    else {
        cout << "FAILED!" << " (" << elapsed << " seconds)" << endl;
        cout << "           Expected: " << to_string(__expected) << endl;
        cout << "           Received: " << to_string(__result) << endl;
        return false;
    }
}
예제 #2
0
int main() {
    KitayutaMart2 test;
    std::cout << test.numBought(160, 163680) << std::endl;

    return 0;
}