CookOff Pathetic products

question :- CodeChef: Practical coding for everyone
mysub :- CodeChef: Practical coding for everyone
Why doesn’t it work?
What I did was, traversed every prime number in 0 to 100 and did dfs from the leaf that is in the path of the diameter,and whenever the depth is divisible by the prime i multiplied the prime with the ans[node], Can you give me a test case where it fails or provide a reason?

How does this solution work. I have no idea. Link

your not checking if product might go greater than 2e18

he colored the tree into 2 colors such that no 2 neighbours have same color.
now he found lcm (1 to 100) and divided it into product of 2 elements ,thats it.

2e18 assert soln
https://www.codechef.com/viewsolution/35816803
-ve assert soln
https://www.codechef.com/viewsolution/35813894
The above submissions are with appropriate assert statements which disproves the claim