CF274A k-Multiple Free Set
Description
A $ k $ -multiple free set is a set of integers where there is no pair of integers where one is equal to another integer multiplied by $ k $ . That is, there are no two integers $ x $ and $ y $ $ (x
Input Format
The first line of the input contains two integers $ n $ and $ k $ ( $ 1
Output Format
On the only line of the output print the size of the largest $ k $ -multiple free subset of $ {a_{1},a_{2},...,a_{n}} $ .
Explanation/Hint
In the sample input one of the possible maximum 2-multiple free subsets is {4, 5, 6}.