10622 - Perfect P-th Powers

出處https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1563

解題策略

求出31622(sqrt(10^9))以內質數,利用這些質數進行質因數分解。 注意-2^31與負數,負數的次方須除以2剩下奇數為止