Expedia Group interview question

Write a code based on divisibility of numbers.