Submission #515518
Source Code Expand
#include <iostream> #include <vector> #include <string> using namespace std; string change(int km); int main(){ int m; cin >> m; double km = (double)m/1000; if (km < 0.1) cout << 00 << endl; if (0.1 <= km&&km <= 5) cout << change(km) << endl; if (6 <= km&&km <= 30) cout << km+50 << endl; if (35 <= km&&km <= 70) cout << (km - 30) / 5 + 80 << endl; if (km >= 70) cout << 89 << endl; } string change(int km){ if (km < 10){ return "0" + to_string(km); } return to_string(km); }
Submission Info
Submission Time | |
---|---|
Task | B - 視程の通報 |
User | nhoopQstw3E |
Language | C++ (G++ 4.6.4) |
Score | 0 |
Code Size | 524 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘std::string change(int)’: ./Main.cpp:25:28: error: ‘to_string’ was not declared in this scope ./Main.cpp:27:21: error: ‘to_string’ was not declared in this scope