喇里做错了???
查看原帖
喇里做错了???
3579
我珂真尽梨了楼主2014/12/1 18:51
var
  s:string;
  m,i,ans:longint;
procedure search(n:longint);
  var
    i:longint;
begin 
  if m=1 then exit;
  for i:=1 to n div 2 do begin
    inc(ans);
    search(i);
  end;
end;
begin
  readln(s);m:=ord(s[1])-48;
  ans:=1;
  for i:=1 to m div 2 do begin
    inc(ans);
    search(i);
  end;
  write(ans);
end.//求解啊!!!
2014/12/1 18:51
加载中...