#include<time.h>
clock_t t;
t=clock()-t;//求时间差
printf("用时:%lf秒\n",((float)t)/CLOCKS_PER_SEC); //转换成秒单位
// CLOCKS_PER_SEC 一秒包含的毫秒数
log10(n)/log10(2) //log2(n)
#include<time.h>
clock_t t;
t=clock()-t;//求时间差
printf("用时:%lf秒\n",((float)t)/CLOCKS_PER_SEC); //转换成秒单位
// CLOCKS_PER_SEC 一秒包含的毫秒数
log10(n)/log10(2) //log2(n)