Company: Phonepe_4july
Difficulty: medium
The Hidden Trail of Primes Problem Description A team of explorers is mapping an ancient network of tunnels beneath a mountain range in search of a buried relic. The tunnels form a tree with n chambers labelled 1 through n, joined by n-1 bidirectional passages, so that exactly one route connects any two chambers. A chamber is called a prime chamber if its label is a prime number. The relic's vault only opens along a route that passes through exactly 'k' prime chambers. Your task is to count how many distinct simple routes through the tunnel network contain exactly 'k' prime chambers, so the expedition knows how many candidate routes to explore. Note: The route (4,2,5) and the route (5,2,4) are considered the same and should be counted only once. 1 is not a prime number. Input Format The first line of input will be an integer n representing the number of chambers in the tunnel network. The second line of input will be a integer k representing the exact number of prime chambers required