越大越好 Bigger is Better

题意翻译

用不超过 $n$ 根火柴摆出一个尽量大的、能被 $m$ 整除的数。 $1\leq n\leq 100,1\leq m\leq 3000$ 。 翻译 by @Narcissusany .

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=243&page=show_problem&problem=3257 [PDF](https://uva.onlinejudge.org/external/121/p12105.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12105/e19f1e40cef1c30264ec32992d36eab824805f1d.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12105/b8607fc9f48cab0e1059f6744f39323f683264fa.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12105/30d7b6a7e084419ceb12e97d862633f5e5f26c03.png)

输入输出样例

输入样例 #1

6 3
5 6
0

输出样例 #1

Case 1: 111
Case 2: -1