#C12727. Divisible Numbers in Descending Order
Divisible Numbers in Descending Order
Divisible Numbers in Descending Order
Given a list of integers and an integer \(n\), your task is to print all the numbers in the list that are divisible by \(n\), in descending order. If no such numbers exist, output an empty result.
The input consists of two lines. The first line contains a sequence of integers separated by spaces. The second line contains the integer \(n\>.
Output the eligible numbers in one line, separated by a single space, in descending order.
inputFormat
The first line contains a list of integers separated by spaces.
The second line contains a single integer, \(n\), by which divisibility is checked.
outputFormat
Output the numbers from the list that are divisible by \(n\>, arranged in descending order. The numbers should be separated by a single space. If no number qualifies, output nothing.
## sample12 18 24 30
6
30 24 18 12