B. [Atc347A] Divisible

    传统题 1000ms 256MiB

[Atc347A] Divisible

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

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, \dots, 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 < \dots < 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:

N K
A1 A2 A3 ... AN

Output

Divide all elements of AA that are multiples of KK and print the quotients in ascending order with spaces in between.

Explanation:

Sample Input 1

5 2
2 5 6 7 10
1 3 5

Sample Input 2

3 1
3 4 7
3 4 7

Sample Input 3

5 10
50 51 54 60 65
5 6

Programming exercise on 13 August

未参加
状态
已结束
规则
IOI
题目
3
开始于
2024-8-13 16:30
结束于
2024-8-13 18:30
持续时间
2 小时
主持人
参赛人数
3