c++一行代码计算出程序运行时间(仅在解题调试时有用,编译器上无参考价值)
(double)clock() / CLOCKS_PER_SEC << "s";
#include <bits/stdc++.h>
using namespace std;
int main()
{
cout << "1364/2207" << endl;
cout << (double)clock() / CLOCKS_PER_SEC << "s";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
cout << "1364/2207" << endl;
cout << (double)clock() / CLOCKS_PER_SEC << "s";
return 0;
}
相关推荐