vj1032 &aring;&frac34;&ordf;&ccedil;Ž&macr;

# vj1032...

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

//±ÉÈËµÄ·½·¨ //±¶Ôö //Ò»¿ªÊ¼ÔÊýÃ¿´Î³ËÔÊý Ëã³ö×îºóÒ»Î»µÄÑ»·½Ú³¤¶È 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

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

View Full Document
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
Ask a homework question - tutors are online