Expedia Group Interview Question

Write a code based on divisibility of numbers.