内存

P1601 A+B Problem(高精)

emmm。。。百度高精知真相 实际上只需要几个500长度的数组就够了
by zqc111123 @ 2017-11-05 17:31:51


不会啊.....10^500就是500位的数 字符数组或者字符串500位很容易啊
by Sakura_Peng @ 2017-11-05 17:32:03


@[巫文杰](/space/show?uid=64008) 楼主知道字符数组是什么吗
by EAT_NH4HCO3 @ 2017-11-05 17:36:56


@[Wanna1\_Peng](/space/show?uid=24812) 哦!对
by 国服最强关羽 @ 2017-11-05 19:03:00


改了下,60分,请问是怎么回事??? ```cpp var a,b,ch,ch1:ansistring; i,d,e,t,s,c:longint; begin readln(a); readln(b); if length(a)>length(b) then c:=length(a) else c:=length(b); for i:=c downto 1 do begin val(a[i],d); val(b[i],e); s:=d+e+t; t:=s div 10; s:=s mod 10; str(s,ch); insert(ch,ch1,1); if (i=1) and (t>0) then begin ch:='1';insert(ch,ch1,1);end; end; writeln(ch1); end. ```
by 国服最强关羽 @ 2017-11-05 19:21:47


|