#P9254. Automated Scoring for Submissions
Automated Scoring for Submissions
Automated Scoring for Submissions
The judges are tired of manually computing scores for each submission. Your task is to automate this process. For each problem, a submission can score from 0 to 10. There are ( n ) test cases provided, where ( n ) is divisible by 10. These test cases are divided into 10 groups each containing ( \frac{n}{10} ) test cases. A submission earns 1 point for a group if and only if it passes every test case within that group. The final score is the sum of the points from all 10 groups.
Note:
- For simplicity, it is assumed that every group contains the same number of test cases.
- Your solution should compute the final score based on the provided results.
inputFormat
The input consists of two lines. The first line contains an integer ( n ) (( n ) is divisible by 10) representing the total number of test cases. The second line contains ( n ) space-separated integers. Each integer is either 0 (indicating failure) or 1 (indicating success).
outputFormat
Output a single integer representing the total score. For each group of ( \frac{n}{10} ) test cases, if all the cases are 1 (passed), the group contributes 1 point; otherwise, it contributes 0 points. The total score is the sum of the points from all 10 groups.
sample
10
1 1 1 1 1 1 1 1 1 1
10