#include <iostream> #include <cmath> using namespace std; float js(float a){ if(a<1){ return 0.0; } if(a<=70){ return 0.1; } float b=a/70; return ceil(b)*0.1; } int main(int argc, char** argv) { int n; cin>>n; int m; float he; for(int i=0;i<n;i++){ cin>>m; he=he+js(m); } printf("%.1f",he); return 0; }
标签:短信,int,float,js,计费,include,he From: https://www.cnblogs.com/fushuxuan/p/17090125.html