Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
132259 李朋秦 短信计费 C++ Runtime Error 1 MS 276 KB 307 2025-10-07 15:13:12

Tests(2/10):


Code:

#include<bits/stdc++.h> using namespace std; double d(int x){ if(x<=70){ return 0.1; }else{ if(x%70==0)return 0.1*(x/70); else return 0.1*(x/70+1); } } int main (){ int n,a[1001]; double c=0; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; c+=d(a[i]); } cout<<c; return 0; }


Run Info:

Runtime Error:Segmentation fault