#include <iostream> using namespace std; // Compile-time temperature lookup table constexpr int TEMP_TABLE[6] = { -40, -10, 20, 50, 80, 120 }; int main() { int idx; cin >> idx; cout << TEMP_TABLE[idx]; return 0; }
Test Cases
Test Results
Input
0
Expected Output
-40