Codeforces Round 158 (Div. 2)
A
Adding Digits
Codeforces
1400
原题
←B →
翻译中…

Vasya has got two number: $*a*$ and $*b*$. However, Vasya finds number $*a*$ too short. So he decided to repeat the operation of lengthening number $*a*$ $*n*$ times.

翻译中…

One operation of lengthening a number means adding exactly one digit to the number (in the decimal notation) to the right provided that the resulting number is divisible by Vasya's number $*b*$. If it is impossible to obtain the number which is divisible by $*b*$, then the lengthening operation cannot be performed.

翻译中…

Your task is to help Vasya and print the number he can get after applying the lengthening operation to number $*a* *n*$ times.

翻译中…

Input

翻译中…

The first line contains three integers: $*a*, *b*, *n* (1 ≤ *a*, *b*, *n* ≤ 10^{5})$.

翻译中…

Output

翻译中…

In a single line print the integer without leading zeros, which Vasya can get when he applies the lengthening operations to number $*a* *n*$ times. If no such number exists, then print number -1. If there are multiple possible answers, print any of them.

翻译中…

样例

Input #1
5 4 5
Output #1
524848
InputCopy OutputCopy
Input #2
12 11 1
Output #2
121
InputCopy OutputCopy
Input #3
260 150 10
Output #3
-1
InputCopy OutputCopy
题目信息
题号
260A
时间限制
2 s
内存限制
256 MB
标签
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。