Next Multiple of X after N

 Coding Problem Keys 

 Next Multiple of X after N 

 Problem Statement 

The program must accept two integers N and X as the input. The program must print the next multiple of X after N as the output.

 Input Format 

The first line contains N and X separated by a space.

 Output Format 

The first line contains the next multiple of X after N.

 Boundary Condition(s) 

1 <= N, X < 10

 Example Input/Output 1 

 Input 

147 20

 Output 

160

 Explanation 

The next multiple of 20 after 147 is 160.
Hence the output is 160.

 Example Input/Output 2 

 Input 

20 10

 Output 

30

 Max Execution Time Limit: 500 millisecs 

 Solution 

 Programming Language: Python 3 Language 



# Published By PKJCODERS

 (Note: Incase If the code doesn't Pass the output kindly comment us with your feedback to help us improvise.) 

Comments

Popular Posts

Sum - Remove Last Occurring Zero

Maximum LCM of Adjacent Pair

Four Integers

Array Frequency Equals Value

Sort N Strings - Descending Order

Swap First & Third Parts - Nth Character