不是VIP会员,不能显示答案

题目解答

题目:
var
t: longint;
function f(x:longint): longint;
begin
if x = 0 then exit(0)
else if x mod 2 = 0 then exit(2 + f(x-1))
else exit(1 + f(x-1));
end;
begin
read(t);
writeln(f(t));
end.
输入:2014
输出:3021
考点: 0
分析:
解答: 1007+2014=3021
评论:
老师: 0