Company: Flipkart_26july
Difficulty: medium
Energy Transfer in Battle of the Band Problem Description Murat and Hayat are playing an online game "Battle of the Band" with their respective armies. Each soldier in their armies has some energy levels. In the middle of the game, Hayat's army gets weak and they need help from Murat's army. Murat's army doesn't have the power to help them but Murat has a special power with which he can increase the power of his soldiers by transferring the energy of the soldiers within the army. Transferring of energy can happen between the soldiers who are standing at S distance from each other. If the sum of the energies of all the soldiers who are at S distance(Se) from each other can be expressed as sum of K (K is the number of soldiers who take part in sharing) prime numbers, then all the soldiers of both the armies with distinct energies and one among the two soldiers with the same energy in both the armies can win the battle. If Se cannot be expressed as the sum of K prime numbers then only the