hdu 1164: Eddy's research I
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1164
算法一:试除法
算法思路:i = 1 to n^(1/2) ,找到能整除的素因子。该方法容易想到,但进行了很多不必要的运算,时间复杂度比较高。
参考代码:
#include
#include
#include
#include