AlgoUniversity
  • Go Back
Discussion
Multiple :

Author

Shikhar Mehrotra

Difficulty Level : Medium

Submissions : 451

Asked In : Intel

Marks :20

: 1 | : 1

Find the least number $$$M$$$ that includes $$$X$$$ as the leading digits and also $$$M$$$ is a multiple of $$$Y$$$.

Input

The input consist of 2 integers of form $$$X$$$ $$$Y$$$

$$$1\le X \le 10^{18}$$$

$$$1\le Y \le 10^{9}$$$

Output

Output the value of $$$M$$$

Examples

Input
33 11
Output
33
Input
50 3
Output
501

Note

In second test case values of $$$M$$$ are $$$50,500,501,502...$$$ and so on.

Since $$$501$$$ is the smallest value of $$$M$$$ which is divisible by $$$Y=3$$$,, Hence $$$501$$$ is our answer.

You need to login to view your submissions.

You need to login to view all submissions.

Loading...

Result : Executed

Loading...

Feel something is wrong with the test cases?

Result : Accepted

Test Cases :

You need to Log In
We're glad that you want to attempt this problem!

But to Run or Submit the Problem, you need to Log In.

Continue to Log In
Challenge Submitted!

Your challenge has been submitted successfully.

You will get a response soon via WhatsApp or Email.

Challenge
Facing issue while trying to solve the problem! Don't worry, we got you covered!

Do let us know your issue.

Looks good!
Please enter your issue / feedback.

How do we get in touch with you?
Looks good!
Please enter your phone no.
Looks good!
Please enter your email address.