#P9427. [蓝桥杯 2023 国 B] 拼数字
[蓝桥杯 2023 国 B] 拼数字
Problem Description
Xiao Lan wants to use digits and digits to form an integer with digits. Please compute the largest multiple of that Xiao Lan can form.
Input Format
Two integers and .
Output Format
An integer with digits, representing the answer. If it is impossible to form a multiple of , output .
2 8
2233333333
Hint
Constraints
- For of the testdata, .
- For of the testdata, .
- For of the testdata, .
- For of the testdata, .
Final Round of the 14th Lanqiao Cup Software Contest, C/C++ College Group B, Problem I.
Translated by ChatGPT 5