AlgoLounge

Multiple Check

easy

Given two integers x and y, return true if x is a multiple of y, otherwise return false.

Examples

Example 1

Input:  x = 15, y = 3
Output: true

15 = 3 × 5

Example 2

Input:  x = 10, y = 3
Output: false

Constraints

  • Handle edge cases with zero values
  • Standard integer range
TypeScript
Loading editor…
List of test cases (10)
Case 1
x = 15
y = 3
Case 2
x = 10
y = 3
Case 3
x = 0
y = 5
Case 4
x = 7
y = 0
Case 5
x = 100
y = 10
Case 6
x = 20
y = 4
Case 7
x = 17
y = 5
Case 8
x = -12
y = 3
Case 9
x = 1
y = 1
Case 10
x = 25
y = 6