Submission #3804630
Source Code Expand
#include <bits/stdc++.h> using namespace std; int main() { double m; cin >> m; m = m / 1000; if (m < 0.1) { cout << 00 << endl; } else if (m >= 0.1 & m <= 5) { if (m < 1) { cout << 0 << m * 10 << endl; } else { cout << m * 10 << endl; } } else if (m >= 6 & m <= 30) { cout << m + 50 << endl; } else if (m >= 35 & m <= 70) { cout << (m - 30) / 5 + 80 << end; } else { cout << 89 << endl; } }
Submission Info
Submission Time | |
---|---|
Task | B - 視程の通報 |
User | Cebu |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 455 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:24:29: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}’ and ‘<unresolved overloaded function type>’) cout << (m - 30) / 5 + 80 << end; ^ In file included from /usr/include/c++/5/istream:39:0, from /usr/include/c++/5/sstream:38, from /usr/include/c++/5/complex:45, from /usr/include/c++/5/ccomplex:38, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52, from ./Main.cpp:1: /usr/include/c++/5/ostream:108:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>] ...