#K45187. Maximum Correct Answers
Maximum Correct Answers
Maximum Correct Answers
Binu is given a series of questions, each with a specific number of attempts allowed. For each question, he can attempt as many times as allowed, but since he always answers correctly eventually with his attempts, the maximum number of questions he can answer correctly is simply the total number of questions. Given the number of questions (q) and a list of maximum attempts permitted for each question, your task is to compute the maximum number of questions Binu can answer correctly.
The challenge is trivial in logic but tests your ability to correctly parse input from stdin and output to stdout. Use proper I/O handling to make sure your solution is robust for typical competitive programming environments.
inputFormat
The first line contains a single integer (q) which represents the number of questions. The second line contains (q) space-separated integers, where each integer represents the maximum number of attempts allowed for the corresponding question.
outputFormat
Output a single integer representing the maximum number of questions that Binu can answer correctly.## sample
3
1 2 3
3