uva-10791 - Minimum Sum LCM

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

解題策略

質因數分解,每個因數與該因數的指數當成一個數字的和最小。n=1,結果為2;當質因數只有一個數字,結果為n+1;n=2147483647,是質數,結果為n+1,使用int會溢位。