[TLE] POJ 1730 Perfect Pth Powers
摘要:
给出一个32位整型数 n,形如 n = x^p 的最大的 p;质因数分解;TLE,DISCUSS 中有的用枚举做的(要考虑浮点数精度问题),但是质因数分解应该也可以啊,为什么老是TLE?求大牛指点。# include <stdio.h># include <math.h>int gcd(int a, int b){return !b ? a:gcd(b, a%b);}int m;char t[60005];int p[10005];void solve(long long int n);void build_ptable(void);int main(){ long l 阅读全文
posted @ 2012-05-02 22:02 getgoing 阅读(243) 评论(0) 推荐(0) 编辑