Leticia 2014-01-15 06:38:54
点我顶贴
收藏
删除
var
n,x,m,i,q,p,s,j:longint;
c:string;
begin
read(n,x);
for i:=1 to n do begin
m:=i;
str(i,c);
p:=length(c);
for j:=1 to p do begin
q:=m mod 10;
if q=x then s:=s+1;
m:=m div 10;
end;
end;
write(s);
end.