


If ‘firstLetterOfName’ = ‘K’, ‘M1’ = 10, ‘M2’ = 6 and ‘M3’ = 9, then the average marks would be around 7.67. Hence, the output should be as follows:
K 7
The first line contains a single integer T representing the number of test cases.
The first line of each test case contains a character ‘firstLetterOfName’ denoting the first character of the name of the student.
The second line of each test case contains 3 space-separated integers ‘M1’, ‘M2’, and ‘M3’ representing marks of the student in 3 subjects.
For each test case, print two space-separated values i.e. first character of the name of the student and the average marks of the student.
Output for every test case will be printed in a separate line.
1 <= T <= 10
‘A’ <= ‘firstLetterOfName’ <= ‘Z’
0 <= M1 <= 100
0 <= M2 <= 100
0 <= M3 <= 100
Time Limit: 1 sec
The idea is to simply find out the sum of marks in the 3 subjects and then divide it by the total number of subjects to find the average marks.
Here is the algorithm:
Ninja In Interview
First N
Can You Print
Print Name
Print Name
Print Name
Print Name
Print Name
Count Repeating Digits