当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

4294:Multiple

题目描述
  Given a positive integer N, you’re to solve the following problem:
  Find a positive multiple of N, says M, that contains minimal number of different digits in base-K notation. If there’re several solutions, you should output the numerical smallest one. By saying numerical smallest one, we compar their numerical value, so 0xAhex < 11dec.
  You may assume that 1 <= N <= 104 and 2 <= K <= 10.
输入解释
  There’re several (less than 50) test cases, one case per line.
  For each test case, there is a line with two integers separated by a single space, N and K.
  Please process until EOF (End Of File).
输出解释
  For each test case, you should print a single integer one line, representing M in base-K notation,the answer.
输入样例
10 8
2 3
7 5
输出样例
2222
2
111111
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-4294

最后修改于 2020-10-25T23:12:09+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)