First frequent multiple

Write a program that reads a sequence of integer numbers, and prints the first one that is multiple of a given number nn and appears at least a given number of times kk.

Input

The input consists of two numbers n,k>0n,k > 0, followed by a sequence of integers.

Output

The output the first number in the sequence that is multiple of nn and appears at least kk times in the sequence. If there is no such number, the program will print none.

Problem information

Author: ProAl

Generation: 2026-01-25T16:59:58.303Z

© Jutge.org, 2006–2026.
https://jutge.org