题解 | #牛牛的短信#
牛牛的短信
https://www.nowcoder.com/practice/435c9e2bf4f84bee99b82ce84e95b0b7
#include <stdio.h> int main() { int n = 0; scanf("%d", &n); double sum = 0.0; for (int i = 0; i < n; i++) { int val = 0; scanf("%d", &val); if (val > 60) { sum += 0.2 ; } else { sum += 0.1; } } printf("%.1lf", sum); return 0; }
c语言刷题 文章被收录于专栏
c语言刷题题目