- 神奇的K好数
- 2009-05-17 12:04:20 @
program p1215;
var k,l,i,j,p:longint;
f:array[1..16,0..16]of extended;
s:extended;
begin
read(k,l);
for i:=1 to k-1 do f[1,i]:=1;
for i:=2 to l do
for j:=0 to k-1 do
for p:=0 to k-1 do
if (p(j+1))and(p(j-1)) then f:=f+f;
for i:=1 to k do
s:=s+f[l,i];
writeln(s:0:0);
end.
麻烦大牛们给看一下
0 条评论
目前还没有评论...