可以测试自己的代码用时啦 printf("used time = %.3lf\n",(double)clock()/CLOCKS_PER_SEC); 转载于:https://www.cnblogs.com/lxf90/articles/2022145.html