vj1223 麦森数

Vj1223 麦森数

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//ÖÊÒÉvijosÆÀ²âÎ޹ʳ¬Ê± / //±ÉÈ˵ķ½·¨ //¶þ·Ö+¸ß¾«³Ë //ÒòΪ 2 µÄÃÝĩβ²»¿ÉÄÜÊÇ 0 ËùÒÔ 2^p-1 µÄλÊýΪ trunc( lg(2^p) ) + 1 = p*trunc(lg2) + 1 //¶ÔÓÚÐÎÈç a^b µÄ¼ÆËã¿ÉÒÔÓöþ·Ö a^b=a^(b>>1) * a^(b>>1) Èç¹û b ÊÇÆæÊý Ôٸ߾«³Ëµ¥¾«(2) //¸ß¾«³ËûÓÃѹλ ÏÞ¶¨³¤¶È500 ¶àÁ˲»Ëã ²»×ãʱ¼ÆËã×ÔÈ»½á¹ûÊÇ 0 / const maxp=22; base=10; maxb=500; var p,l:longint; a:array[0. .maxp] of boolean; f,tmp:array[0. .maxb+1] of integer; procedure mul; var i,j:integer; begin fillchar(tmp,sizeof(tmp),0); for i:=1 to maxb do for j:=1 to maxb do begin
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2011 for the course CS 001 taught by Professor 001 during the Spring '11 term at Shandong University.

Page1 / 2

Vj1223 麦森数

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online