/* 水仙花数是指一个 n 位数 ( n≥3 ),它的每个位上的数字的 n 次幂之和等于它本身。 (例如:1^3 5^3 3^3 = 153) 通常的穷举算法, CPU0: Intel(R) Pentium(R) CPU P6200 @ 2.13GHz 求解8位数以内的水仙花数需要45s左右的时辰, */ /** @author : 东海陈光剑 2013.4.26 Friday ,0 http://www.kp1111.info/linked/20130425.do 1:02 */ #include #include #include //#include /* 求1-N 以内的水仙花数 */ #define N 1e8 //typedef enum {true = 0, false = !true} bool; /** 打印日志时辰 */ void print_time() { time_t my_time; // time_t /* 时辰类型(time.h 定义) struct tm -- 时辰规划,time.h 定义如下: int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; */ struct tm* timeinfo; time( http://www.goodk123.info/linked/20130425.do
转载于:https://www.cnblogs.com/fpqqchao/archive/2013/04/26/3043922.html