Count the nodes in the given tree whose weight is a powerful number
Given a tree, and the weights of all the nodes, the task is to count the number of nodes whose weight is a Powerful Number. A number n is said to be Powerful Number if, for every prime factor p of it, p2 also divides it. Example: Input: Output: 3 Explanation: 4, 16 and 25 are powerful weights in the