# 執行時間測量 用兩個clock()將要測量的範圍包起來。 ``` #include<bits/stdc++.h> using namespace std; int main() { double s=clock(); for(int i=0;i<1000000000;++i){ } double e=clock(); cout<<"time: "<<e-s<<" ms"<<endl; return 0; } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up