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