| 比赛 | 20101105 | 评测结果 | TAATAAAAAA |
|---|---|---|---|
| 题目名称 | Sramoc问题 | 最终得分 | 80 |
| 用户昵称 | 苏轼 | 运行时间 | 0.000 s |
| 代码语言 | Pascal | 内存使用 | 0.00 MiB |
| 提交时间 | 2010-11-05 19:44:49 | ||
program sramoc(input,output);
label no;
var
i,ii,m,k,j,tmp:int64;
begin
assign(input,'sramoc.in');
reset(input);
assign(output,'sramoc.out');
rewrite(output);
readln(k,m);
k:=k-1;
i:=m;
repeat
j:=i;
while j>0 do
begin
tmp:=j mod 10;
if tmp>k then
goto no;
j:=j div 10;
end;
writeln(i);
break;
no:
i:=i+m;
until 1=0;
close(input);
close(output);
end.