Given an array containing distinct positive integers and an integer k. The task is to find the largest possible k-multiple set from the array of given elements.
A set is called a k-multiple set if no two elements of the set i.e., x, y exits such that y = x*k.
There can be multiple answers. You can Print any of them.
Examples:
Input : a[] = {2, 3, 4, 5, 6, 10}, k = 2
Output : {2, 3, 5}
{2, 3, 5}, {2, 3, 10}, {2, 5, 6}, {2, 6, 10}, {3, 4, 5}, {3, 4, 10},
{4, 5, 6}, {4, 6, 10} are possible 2-multiple sets.
Input : a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, k = 2
Output : {1, 3, 4, 5, 7, 9}