题目:给你一个数k判断2^(k-1)*(2^k-1)是不是完全数(真因数之和和自身相等),不是判断k是不是素数。
分析:数论。欧拉证明了所有偶完全数都满足式子2^(k-1)*(2^k-1);其中2^k-1为素数时,上式为完全数。
满足2^k-1形式的素数叫梅森素数,这里打表计算50000内的素数判断2^k-1是不是素数即可。
(入股存在,超过50...
分类:
其他好文 时间:
2014-11-28 01:06:19
阅读次数:
201
Electric FencesKolstad & Schrijvers Farmer John has decided to construct electric fences. He hasfenced his fields into a number of bizarre shapes an.....
分类:
其他好文 时间:
2014-11-27 01:27:02
阅读次数:
210
Emuskald considers himself a master of flow algorithms. Now he has completed his most ingenious program yet — it calculates the maximum flow in an undirected graph. The graph consists of n vertices
...
分类:
其他好文 时间:
2014-11-26 01:26:22
阅读次数:
206
A Famous Music Composer
时间限制:1000 ms | 内存限制:65535 KB
难度:1
描述
Mr. B is a famous music composer. One of his most famous work was his set of preludes. These 24 pieces span the 24 musical ...
分类:
其他好文 时间:
2014-11-25 16:29:10
阅读次数:
420
Description
One of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers....
分类:
其他好文 时间:
2014-11-25 14:39:38
阅读次数:
275
Description
n the modern time, Search engine came into the life of everybody like Google, Baidu, etc.
Wiskey also wants to bring this feature to his image retrieval system.
Every image have a...
分类:
其他好文 时间:
2014-11-24 10:15:04
阅读次数:
190
F - Play with Chain
Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
YaoYao is fond of playing his chains. He has a chain containi...
分类:
其他好文 时间:
2014-11-24 06:31:35
阅读次数:
175
Description
After Farmer John realized that Bessie had installed a "tree-shaped" network among his N (1
Bessie, feeling vindictive, decided to sabotage Farmer John's network by cutting power to...
分类:
其他好文 时间:
2014-11-23 17:35:43
阅读次数:
190
Description Farmer John is assigning some of his N (1 #include #include #include #include #include #include #include #include #include #include #defin...
分类:
其他好文 时间:
2014-11-23 13:02:46
阅读次数:
261
Description
Andy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he knows is, well, not quite enough. Instead of think...
分类:
其他好文 时间:
2014-11-20 23:50:12
阅读次数:
354