#P1602. Sramoc 问题
Sramoc 问题
Description
After the employees finished sorting the chopsticks, they were about to deliver the takeout, but when they checked the order, they were stunned: there was no phone number, only a function written down.
What is this? What does it mean? So the restaurant called in members of the senior advisory group, YQ, SC, and HQ. After extensive research, they found some information:
denotes the smallest positive integer, composed of the digits , that is divisible by .
For example, when , . Naturally, the phone number is .
To send out the takeout as quickly as possible, the computer team members buried their heads and started computing this peculiar number.
Input Format
Two integers .
Output Format
A single line, that phone number (the smallest number).
2 7
1001
Hint
For of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号