Largest Multiple <= N
Computer Mathematics
Easy
3 views
Problem Description
Given n and k>0, print the largest multiple of k that is
Input Format
Two integers n k.
Output Format
One integer.
Official Solution
Compute q = floor(n/k). Answer = q*k.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!