题目链接: http://poj.org/problem?id=1707 Language: Default Sum of powers Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 735 Accepted: 354 Description A young schoolboy would like to calculate the sum for some fixed natural k and differe…
转帖:Euler's Sum of Powers Conjecture 存不存在四个大于1的整数的五次幂恰好是另一个整数的五次幂? 暴搜:O(n^4) 用dictionary:O(n^3) import itertools def euler(m): """Yield tuples (a, b, c, d, e) such that a^5 + b^5 + c^5 + d^5 = e^5, where all are integers, and 1 < a ≤ b ≤…
Description A young schoolboy would like to calculate the sum for some fixed natural k and different natural n. He observed that calculating ik for all i (1<=i<=n) and summing up results is a too slow way to do it, because the number of required ari…
ID Origin Title 111 / 423 Problem A LightOJ 1370 Bi-shoe and Phi-shoe 21 / 74 Problem B LightOJ 1356 Prime Independence 61 / 332 Problem C LightOJ 1341 Aladdin and the Flying Carpet 54 / 82 Problem D LightOJ 1336 Sigma Function 66 /…