#include <iostream> using namespace std; int main() { int firstValue, secondValue; cin >> firstValue >> secondValue; // Allocate first telemetry packet int* packet = new int; *packet = firstValue; // Delete old packet before reusing pointer delete packet; // Allocate second telemetry packet packet = new int; *packet = secondValue; // Print final packet value cout << *packet; // Final cleanup delete packet; return 0; }
Test Cases
Test Results
Input
25 40
Expected Output
40