HackerRank Non-Divisible Subset problem solution