提交时间:2023-04-24 19:28:45
运行 ID: 15596
#include<bits/stdc++.h> using namespace std; float duanxinyuan(int q){ float y; for(int i=0;i<q;i++){ if(q>=70){ y+=0.1; q-=70; }else{ y+=0.1; break; } } return y; } int main() { int n; cin>>n; int a[n]; float c; for(int i=0;i<n;i++){ cin>>a[i]; c+=duanxinyuan(a[i]); } cout<<fixed<<setprecision(1)<<c; return 0; }