#CCBCHBON0000005. Bỏ vị trí chia hết cho k (Skip Multiples of k)
Bỏ vị trí chia hết cho k (Skip Multiples of k)
Skip Multiples of k
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given positive , omit each index with . Print remaining indices in ascending order separated by exactly one space, or EMPTY if none. Do not print a trailing space.
Input
One line contains and ; .
Output
Print one line of remaining indices, or EMPTY.
Subtasks
-
Subtask 1 (20%): , .
-
Subtask 2 (30%): , .
-
Subtask 3 (50%): , .
Examples
Example 1
Input:
5 2
Output:
1 3 5
Explanation:
Skip indices divisible by k; print EMPTY if none remain.
Example 2
Input:
1 1
Output:
EMPTY
Explanation:
Skip indices divisible by k; print EMPTY if none remain.