batterup - bradendubois/competitive-programming GitHub Wiki
Batter Up
ID: batterup
Difficulty: 1.3
CPU Time: 1 second
Memory: 1024 MB
Solution
For this problem, the score is composed of (sum of the values of the inputs) / (number of the inputs), which can be done easily by simply disregarding the "walks" (-1), and summing the inputs otherwise, and keeping a tally of the non-walk inputs.