Poke Dice solution codechef
There arepokemon in a class, each pokemon is given 2 fair dice. One of the dice contains : 2, 7, 12, 17, 22 & 27 and the other dice contains : 3, 8, 13, 18, 23 & 28.
The pokemon are asked to throw both the dice-times and sum up whatever comes each time on both the dice and add all the outcomes.
You ask each pokemon the sum of all the outcomes but strangely some of them are lying. Find the number of honest answers.
Input: Poke Dice solution codechef
The first line of the input contains a single integerdenoting the number of test cases. The description of test cases follows.
The first line of each test case contains a single integer.
The second line contains a single integer.
The third line containsspace-separated integers , the sum of all the outcomes of pokemon.
Output: Poke Dice solution codechef
For each test case, print a single integer, the number of honest pokemon.
Constraints Poke Dice solution codechef
Sample Input: Poke Dice solution codechef
We can only get 15 from the two dice. To get 15 -> Dice1: 7 and Dice2: 8.