- 麦森数
- 2009-09-05 09:48:52 @
var i,m,len,k,j:longint;
c:array [1..910000] of longint;
begin
readln(m);c[1]:=1;len:=1;
for k:=1 to m do
begin
for j:=len downto 1 do
c[j]:=c[j]*2;
for j:=len downto 1 do
if c[j]>9 then
begin
c[j+1]:=c[j+1]+c[j] div 10;
c[j]:=c[j] mod 10;
end;
if c[len+1]>0 then inc(len);
end;
c[1]:=c[1]-1;
write(len);
for k:=500 downto 1 do
begin
if k mod 50=0 then writeln;
write(c[k]);
end;
end.
才50分,5个点超了时~~~
4 条评论
-
贱人在我右边 LV 9 @ 2016-10-26 13:43:15
hehe
-
2016-09-08 14:37:00@
而且位数要用公式
-
2016-09-08 14:36:38@
要用二分
-
2009-09-05 17:19:28@
铁的会超
这道题要递归的做
高精要压位
- 1