vj1032 循环

vj1032...

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

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //±¶Ôö //Ò»¿ªÊ¼ÔÊýÿ´Î³ËÔÊý Ëã³ö×îºóһλµÄÑ»·½Ú³¤¶È k1 //È»ºó ºóÁ½Î»µÄÑ»·½Ú±Ø¶¨ÊÇ×îºóһλѻ·½ÚµÄ±¶Êý Õâʱ´ÓÔÊý¿ªÊ¼Ã¿´Î³Ë n^k1 ÕÒµ½µÚ¶þλѻ·½ÚÊǵÚһλµÄ k2 ±¶ //È»ºó µÚÈýλ´ÓÔÊýÿ´Î³Ë n^k1^k2 //. .. //ÿ´Î×î¶à³Ë 10 ´Î ²»³öÏÖ¸Ãλѻ·ÔòÎÞ½â //ÆäÖÐÿ´Î³Ë n^k ¿ÉÒÔÔÚÕÒÑ»·½ÚµÄʱºò˳±ãËã³öÀ´ » //ÒòΪҪÅжϵ¥Î»Ñ»·½Ú ËùÒÔ²»ÓÃѹλ¸ß¾«´¦Àí·½±ã » const maxn=100; base=10; type bignum=array[0. .maxn+1] of longint; var n,m,len:integer; cycle:array[0. .maxn] of integer; a,now,last,cum,ans,tmp:bignum; procedure out; begin writeln(-1); halt; end; procedure mul(var g:bignum); var i,j:integer; begin fillchar(tmp,sizeof(tmp),0); for i:=1 to m do for j:=1 to m do begin if i+j-1>maxn then break; inc(tmp[i+j-1],g[i]*last[j]); if tmp[i+j-1]>=base then 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

vj1032...

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