#K42132. Inviting Divisible Friends
Inviting Divisible Friends
Inviting Divisible Friends
You are given two integers n and k. Each friend has an ID from 1 to n. A friend with an ID i is invited if and only if it satisfies the divisibility condition $$ i \mod k = 0 $$.
Your task is to output the IDs of the invited friends in increasing order separated by a single space. If no friend satisfies the condition, output None
(as a string).
inputFormat
The input consists of a single line containing two space separated integers n and k (1 ≤ n, k ≤ 109).
outputFormat
Output a single line containing the invited friend IDs separated by a space. If no friend is invited, output None
.
10 3
3 6 9