Logo
IconChallenge
Icon
IconProblem
IconSolutions
IconSubmissions

Smallest Missing Multiple of K

XPChallenge Points: 10
levelLevel: Easy

You are given an integer array nums and an integer k.
Your task is to find the smallest positive multiple of k that is not present in the array nums.
A multiple of k is any positive integer that can be written as m * k, where m is a positive integer.

Example 1:

Input: nums = [3, 6, 9, 12] k = 3

Output: 15

Example 2:

Input: nums = [5, 10, 20, 25] k = 5

Output: 15

to Continue
like
dislike

Accepted:

Submission:

IconReport an issue
Icon
IconCode
IconYou need toto run or submitYou need toto run or submit
IconTest Case
IconTest Result