Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
165092 屠思宇 08打车费用 C++ Compile Error 0 MS 0 KB 254 2026-11-09 19:59:05

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int d; cin>>d; if (d>2){ km=2*6+(d-2)*1.8; cout<<km<<endl; } else if (d>10){ km=km+1.8/2*(d-10); cout<<km<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:9: error: 'km' was not declared in this scope
         km=2*6+(d-2)*1.8;
         ^
Main.cc:11:9: error: 'km' was not declared in this scope
         km=km+1.8/2*(d-10);
         ^