题解 | #牛牛的短信#
牛牛的短信
https://www.nowcoder.com/practice/435c9e2bf4f84bee99b82ce84e95b0b7
#include <stdio.h> int main() { double test(int x); int a, b; scanf("%d",&a); double z; z=(double)test(a); printf("%.1f",z); return 0; } double test(int x) { int i; int y; double c=0,e=0; for(i=0;i<x;i++) { scanf("%d",&y); if(y<=60) { c=c+0.1; } if(y>60) { e=e+0.2; } } return c+e; }#牛客创作赏金赛#