题目: 题目描述
下面给出 55 个程序,请在本地编译运行,测试程序的运行时间,并对程序进行排序
AC
1 2 3 4 5
你去试试
#include<stdio.h>
#include<time.h>
int main(){
clock_t run_start,run_finish;
run_start = clock();
// 要测试的代码
run_finish = clock();
double run_time = (double)(run_finish - run_start)/CLOCKS_PER_SEC*1000;
printf("run time is %fms\n",run_time);
return 0;
}