#abc347a. A - Divisible

A - Divisible

Score: 100100 points

问题陈述

给定正整数 NNKK,以及长度为 NN 的序列 A=(A1,A2,,AN)A=(A_1,A_2,\ldots,A_N)

提取 AA 中所有是 KK 的倍数的元素,将它们除以 KK,然后打印这些商。

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

You are given positive integers NN and KK, and a sequence of length NN, A=(A1,A2,,AN)A=(A_1,A_2,\ldots,A_N).

Extract all elements of AA that are multiples of KK, divide them by KK, and print the quotients.

Constraints

  • 1N,K1001\leq N,K\leq 100
  • 1A1<A2<<AN1001\leq A_1 < A_2 < \ldots < A_N \leq 100
  • AA has at least one multiple of KK.
  • All given numbers are integers.

Input

The input is given from Standard Input in the following format:

NN KK

A1A_1 A2A_2 \ldots ANA_N

Output

Divide all elements of AA that are multiples of KK 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 22 among the elements in AA are 22, 66, and 1010. Divide them by 22 to get 11, 33, and 55, 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