IT Passport Examination Grading
Time limit2sMemory limit256 MB
Add each applicant's three field scores and mark PASS only when the total reaches 55 and every field meets its 30 percent cutoff.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
The IT Passport Examination has 100 questions worth one point each, so the maximum score is 100. The questions cover three fields.
- Strategy, 35 points
- Management, 25 points
- Technology, 40 points
An applicant passes only when both conditions hold. The total score is at least 55% of 100, and the score in every field is at least 30% of that field's points. The thresholds are used as they are, with no rounding: 10.5 points in strategy, 7.5 points in management, and 12 points in technology.
Write a program that reads the three field scores of each applicant and reports the total score and the verdict.
Input
The first line contains the number of applicants ().
Each of the next lines describes one applicant: an eight digit applicant number followed by three integers , , , separated by spaces. , , are the scores in strategy, management, and technology, and satisfy , , . An applicant number can start with zeros.
Output
Print one line per applicant, in the order given in the input. Each line contains the applicant number, the total score, and the verdict, separated by single spaces. The verdict is PASS when the applicant passes and FAIL otherwise.