Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102693 | 张黄源 | 短信计费 | C++ | Compile Error | 0 MS | 0 KB | 356 | 2024-12-22 14:15:47 |
#include<bits/stdc++.h> using namespace std; double gj(int zs){ double monye=0; if(zs%70!=0){ monye=zs/70+0.1+0.1; }else{ monte=zs/70*0.1; } } int main() { int n; cin>>n; int a[114514]; for(int i=0;i<n;i++){ cin>>a[i]; } double sum=0; for(int i=0;i<n;i++){ sum+=gj(a[i]); } printf("%.1lf",sum); return 0; }
Main.cc: In function 'double gj(int)': Main.cc:9:3: error: 'monte' was not declared in this scope monte=zs/70*0.1; ^ Main.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^