题解 | #牛牛的短信#
牛牛的短信
https://www.nowcoder.com/practice/435c9e2bf4f84bee99b82ce84e95b0b7
#include <iostream> using namespace std; int main() { double sum=0;//注意sum应当为浮点型 int n,a[54188]; cin>>n; for(int i=1;i<=n;i++) { cin>>a[i]; if(a[i]<=60)sum=sum+0.1; else sum=sum+0.2; } cout<<sum; return 0; }