โ† HSBC questions

Nearest Multiple

Filed under HSBC

Given two integers m and n, return an integer which is a multiple of n and nearest to m. If there are two equally near multiples, return the larger one (or define a consistent tie-breaking rule).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related HSBC questions

Collected from public candidate posts and coding forums. Updated Nov 2026.