题解 | #牛牛的短信#
牛牛的短信
https://www.nowcoder.com/practice/435c9e2bf4f84bee99b82ce84e95b0b7
#include <stdio.h> int main() { int n = 0; while (1 == scanf("%d", &n)) { int word = 0; double sum = 0.0; for (int i = 0; i < n; i++) { scanf("%d", &word); if (word < 60) { sum += 0.1; } else { sum += 0.2; } } printf("%.1lf", sum); } return 0; }