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 n and appears at least a
given number of times k.

Input

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

Output

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

Problem information

Author: ProAl

Generation: 2026-01-25T13:28:29.879Z

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