#abc347a. A - Divisible
A - Divisible
Score: points
问题陈述
给定正整数 和 ,以及长度为 的序列 。
提取 中所有是 的倍数的元素,将它们除以 ,然后打印这些商。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
You are given positive integers and , and a sequence of length , .
Extract all elements of that are multiples of , divide them by , and print the quotients.
Constraints
- has at least one multiple of .
- All given numbers are integers.
Input
The input is given from Standard Input in the following format:
Output
Divide all elements of that are multiples of and print the quotients in ascending order with spaces in between.
Sample Input 1
5 2
2 5 6 7 10
Sample Output 1
1 3 5
The multiples of among the elements in are , , and . Divide them by to get , , and , and print them in ascending order with spaces in between.
Sample Input 2
3 1
3 4 7
Sample Output 2
3 4 7
Sample Input 3
5 10
50 51 54 60 65
Sample Output 3
5 6