HBC25068PokémonGo[USACO 2007 Mar L]Classroom Statistics题解 (外语:英语口语)

凌晚轩 算法基础篇 28 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
Bessie's teacher hates calculating the cow's grades but loves typing numbers into a computer, however ineptly. Help her figure out each student's average grade while ignoring those grades with typing errors.

Bessie's teacher hates calculating the cow's grades but loves typing numbers into a computer, however ineptly. Help her figure out each student's average grade while ignoring those grades with typing errors. The input file has N (1 <= N <= 100) grades (-100 <= grade <= 100). Any grade that is 0 or below is a typographical error which should be treated as if it didn't exist at least as far as calculating the mean (i.e., ignore the input and do not count that grade when calculating the mean). The mean of a group of numbers is the sum of those numbers divided by the number of numbers. Printing numbers with decimal places is problemmatic, so just multiply the mean by 10 and round it by adding 0.5 before converting it to an integer. Every dataset has at least one proper grade in it.

HBC25068PokémonGo[USACO 2007 Mar L]Classroom Statistics题解
(外语:英语口语)-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC25068PokémonGo[USACO 2007 Mar L]Classroom Statistics题解