讨论 / 我要崩溃了...
Jollwish 2008-11-22 06:10:00
点我顶贴 收藏 删除
这题我交了七遍...

WA...

谁帮忙看看?

状态: [color=red]Unaccepted[/color]

测评机: Xeost[5]

得分: 70分

提交日期: 2008-11-22 21:58:00

有效耗时: 1408毫秒

测试结果1: [color=green]通过本测试点|有效耗时157:ms [/color]

测试结果2: [color=green]通过本测试点|有效耗时47:ms [/color]

测试结果3: [color=green]通过本测试点|有效耗时63:ms [/color]

测试结果4: [color=green]通过本测试点|有效耗时47:ms [/color]

测试结果5: 测试结果错误.错误结果为:5343020604087013733752490768673797798765328582204030250943440003579338723490628492441593893250410257

正确结果应为:50370589157503687733148361888248889173160115365588449980792158558924912038724208842274012247371160257

测试结果6: 测试结果错误.错误结果为:260505155104710502389831883762344223890440530537353947173578904189745155084941117867008815491792511093092779

正确结果应为:380654911430976678084489599180095462050361630706649656093638120316894600653230177867008815491792511093092779

测试结果7: [color=green]通过本测试点|有效耗时63:ms [/color]

测试结果8: [color=green]通过本测试点|有效耗时312:ms [/color]

测试结果9: 测试结果错误.错误结果为:224283547580351733034886895149834311304891543706681128707726260342781340894106282898822958912420442438048043840429594213740369477389987230728575475520015460503811136025062841993909745943242482827110949182075787354652024755966949441502913883013936578193918306723781989244670277432799854750111319106097597855538360585182141916788705226236210115129000567360076810340506495736539056536285615224517958647216592743647371406960624453497529071703704994052458994624270783093606581962415615932643533443982904482623520874779511569528924350287846369169173902938985121958335819927458779738624372340154005896741316649506979712477326341909481131158024829870583611714308098277050336835697544377447119333475609992716991100005230087061179353872186747516862129892497826889625854771555759128660012186055876339916164374070609496500664013840781638866688150706121152807419934632562502464188687388560805552768101325894357375721537788483807242028208125224703430946470568990074143215560177834064689652175383684306476906100034804209005919478626751778352636498073376918992413711397501513933657240317165489493297722273001930185208325065742253108461080623791818812619813677190871297022778668240885043843818887114436447436118346184339149928434526282692170019970671875554421323760687145249728916313274457903121966400755287509236942375673743914319635044741177228817204886651698215005293347227063590869403390466307855503115962582948398865799575140065219684528796174623269810292182763599691951312184690931834453406851809669089452830846519274444835045293989958286702607376

正确结果应为:463916959259204380193386436420210660861743511518148469866859531034010003592491992903923951272311722598759043347341618679201972148395585360706739216996630465280046856643129434853606639935570995797910821109915209922501367117065416765399437271785414503167824860007352601493312082528812766907100734491141207981154417346382764426781380952606644329016522038089538370971274983826667166930824165957516797227058483177806939859305578530783844305985455066411209754060759404061702940153582546747885772644961197302475474038555912224479591437469365088721678849848051522814231273371389597407888335033984597256594210586021474616483810276014655042208704841643435883207760912473514323759390020102713627554797641356204350041388678616256825471723629316418587767575576654095374212397443907937819491140933778986548086690964199309647311635614358304811394971626125363499874059586374848563248492785927313494133081063798288574681960228658482164300970227132151772943998785723273227336443975903091746558987061689422186290543323987801499748683241201322627161686479604844190384261774818247261932917439590228083263884530709701024410035879164775623175037232702580271280355486046076630303260194273393097204098785967430532426239524527286579049163441627920468319521471655087700227047905865217149855817208544349071561045347950591042081115488168711871431211411509474499003278136894421848850060816524516358228684089964628315415356169262879667538242340442626614852453952873728001560656976727031284059651077848394353089085674586130852986771421596723067835693989958286702607376

测试结果10: [color=green]通过本测试点|有效耗时719:ms [/color]

提交代码: type bn=array[0..6000]of longint;

var i,n,a,b,c:integer;

x,z,l,t,xx,zz,ll,ans:bn;

operator *(o:bn;p:integer) q:bn;

var i:longint;

begin

q:=o;

for i:=1 to q[0] do

q[i]:=q[i]*p;

for i:=1 to q[0] do

begin

q[i+1]:=q[i+1]+q[i] div 10000;

q[i]:=q[i] mod 10000;

end;

i:=q[0]+1;

while q[i]>0 do

begin

if q[i]>=10000 then

begin

q[i+1]:=q[i+1]+q[i] div 10000;

q[i]:=q[i] mod 10000;

inc(i);

end

else

break;

end;

dec(i);

q[0]:=i;

end;

operator +(o,p:bn) q:bn;

var i:longint;

begin

q:=o;

if o[0]<p[0] then

begin

q:=p;

p:=o;

end;

for i:=1 to q[0] do

begin

q[i]:=q[i]+p[i];

q[i+1]:=q[i+1]+q[i] div 10000;

q[i]:=q[i] mod 10000;

end;

if q[q[0]+1]>0 then inc(q[0]);

end;

begin

readln(a,b,c,n);

x[0]:=1;

x[1]:=1;

z[0]:=0;

l[0]:=0;

for i:=1 to n do

begin

xx:=x*a;

zz:=z*b;

ll:=l*c;

t:=xx+zz+ll;

l:=z+l;

z:=x;

x:=t;

end;

ans:=x+z+l;

write(ans[ans[0]]);

for i:=ans[0]-1 downto 1 do

begin

if ans[i]<1000 then write(’0’);

if ans[i]<100 then write(’0’);

if ans[i]<10 then write(’0’);

write(ans[i]);

end;

end.

#1 Jollwish@2008-11-22 06:10:00
回复 删除
终于对了!!
查看更多回复
提交回复