Class Average
Easy · rating 900 · Arrays, Math
The first line contains n. The second line contains n exam scores. Print the average, rounded down to the nearest integer.
Editorial
Class Average computes the mean score, rounded down. Sum the scores and use integer division by the count.
print(sum(scores) // len(scores))Complexity
Time: O(n). Space: O(1).
Related problems
- Alternating Sum — Easy
- Floor of Average — Easy
- Sum of Even Elements — Easy
- Array Sum — Easy
- Plus One — Easy
- Shopping Cart Total — Easy