#B3922. Counting without Multiples
Counting without Multiples
Counting without Multiples
Little Yang has to count from 1 to \(N\). However, he wants to skip all numbers that are multiples of \(M\). For example, when \(N=5\) and \(M=2\), he will count only 1, 3, 5
.
inputFormat
The input consists of two space-separated integers \(N\) and \(M\), where \(N\) is the upper bound of the counting, and \(M\) is the number whose multiples should be skipped.
outputFormat
Output the numbers that Little Yang counts, separated by a single space.
sample
5 2
1 3 5