Largest Multiple <= N

Largest Multiple <= N

Easy Computer Mathematics Integers & Divisibility 30 views
Explanation Complexity

Problem Statement

Given n and k>0, print the largest multiple of k that is

Input Format

Two integers n k.

Output Format

One integer.

Example

23 5
20

Constraints

k>0

Input / Output Format

Input Format
Two integers n k.
Output Format
One integer.
Constraints
k>0

Examples

Input:
23 5
Output:
20

Example Solution (Public)

Computer Mathematics
Compute q = floor(n/k). Answer = q*k.

Official Solution Code

Compute q = floor(n/k). Answer = q*k.
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.