#include<iostream> #include<time.h> using namespace std; int main() { clock_t t1 = clock(); for (int i = 0; i < 100000000; i++); clock_t t2= clock(); cout << "time " << t2 - t1 << endl; }
时间: 2024-10-07 01:48:54
#include<iostream> #include<time.h> using namespace std; int main() { clock_t t1 = clock(); for (int i = 0; i < 100000000; i++); clock_t t2= clock(); cout << "time " << t2 - t1 << endl; }