| 记录编号 | 27556 | 评测结果 | TAATAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 492.Sramoc问题 | 最终得分 | 80 | ||
| 用户昵称 | 是否通过 | 未通过 | |||
| 代码语言 | C++ | 运行时间 | 2.010 s | ||
| 提交时间 | 2011-09-26 20:44:37 | 内存使用 | 0.27 MiB | ||
#include <iostream>
#include <fstream>
using namespace std;
int i,j,k,l,m;
long long pp;
bool pan(long long x)
{
while (x>0)
{
if (x%10>=k)
return 0;
x/=10;
}
return 1;
}
int main()
{
ifstream fin("sramoc.in");
ofstream fout("sramoc.out");
fin>>k>>m;
pp=m;
while (!pan(pp))
pp+=m;
fout<<pp<<endl;
fin.close();
fout.close();
return 0;
}