弱弱的AC了

var a,b,c,d,e,f,g,h,i,j,k,l,s,n:longint;

begin

readln(n);

if n div 2 = 0 then n:=n-1;

for i:=1 to n div 2 do

begin

s:=s+1;

for a:=1 to i div 2 do

begin

s:=s+1;

for b:= 1 to a div 2 do

begin

s:=s+1;

for c:= 1 to b div 2 do

begin

s:=s+1;

for d:= 1 to c div 2 do

begin

s:=s+1;

for e:= 1 to d div 2 do

begin

s:=s+1;

for f:= 1 to e div 2 do

begin

s:=s+1;

for g:= 1 to f div 2 do

begin

s:=s+1;

end;

end;

end;

end;

end;

end;

end;

end;

s:=s+1;

writeln(s);

end.

3 条评论

  • @ 2016-10-30 18:26:28
    begin
        write('**666**');
    end.
    
  • @ 2016-02-23 21:19:48

    var
    n,ans:longint;
    procedure doit(t:longint);
    var
    i:longint;
    begin
    if t>0 then
    for i:=1 to t do
    inc(ans);
    for i:=1 to t do
    doit(i div 2);
    end;
    begin
    readln(n);
    doit(n div 2);
    writeln(ans+1);
    end.

  • @ 2015-09-01 12:20:59

    2012-10-19 19:40

  • 1

信息

ID
1130
难度
2
分类
递推 点击显示
标签
递交数
7079
已通过
4174
通过率
59%
被复制
30
上传者