Submission #1678281
Source Code Expand
#include <iostream> using namespace std; int main(){ int m, vv; cin >> m; if (m < 100){ vv = 0; } else if (m <= 5000){ vv = m / 100; } else if (m <= 30000){ vv = m / 1000 + 50; } else if (m >= 35000){ vv = (m/1000 - 30)/5 + 80; } else if (m > 70000){ vv = 89; } cout << setw(2) << setfill('0') << vv << endl; }
Submission Info
Submission Time | |
---|---|
Task | B - 視程の通報 |
User | hal0taso |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 377 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:22:17: error: ‘setw’ was not declared in this scope cout << setw(2) << setfill('0') << vv << endl; ^ ./Main.cpp:22:33: error: ‘setfill’ was not declared in this scope cout << setw(2) << setfill('0') << vv << endl; ^