- 笨笨的果实采摘
- 2009-02-16 11:39:56 @
program p1501;
var
n,i,j,z:integer;
u,d,x,y:longint;
function hs(s:longint):integer;
var
i:integer;
z:longint;
a:array[0..1]of 0..1;
begin
z:=s;
for i:=0 to 1 do
a[i]:=0;
repeat
a[z mod 10]:=1;
z:=z div 10;
until z=0;
if (a[0]=1)and(a[1]=1) then
hs:=1
else
if (a[0]=0)and(a[1]=1) then
hs:=2
else
if (a[0]=1)and(a[1]=0) then
hs:=3;
end;
procedure gc(k,s,j:longint);
var
i,h,z:integer;
a:longint;
begin
if ((n-k-1)=d) then
begin
case hs(s) of
1: y:=y+1;
2: y:=y+2;
3: y:=y+5;
end;
end;
if (k
0 条评论
目前还没有评论...