| 记录编号 | 142821 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 396.[网络流24题]魔术球问题(简化版) | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | Pascal | 运行时间 | 0.001 s | ||
| 提交时间 | 2014-12-10 21:25:41 | 内存使用 | 0.17 MiB | ||
var n,i,tot:longint;
a:Array[1..60] of longint;
begin
assign(input,'balla.in'); reset(input);
assign(output,'balla.out'); rewrite(output);
readln(n);
a[1]:=1;
a[2]:=3;
tot:=2;
for i:=1 to 29 do
begin
tot:=tot+2;
a[i*2+1]:=a[i*2]+tot;
a[i*2+2]:=a[i*2+1]+tot;
end;
writeln(a[n]);
close(input); close(output);
end.