#include <iostream> #include <cstdint> using namespace std; using Packet = uint8_t[8]; int main() { Packet buffer; int temp[8]={0}; for(int i=0; i<8; i++){ cin >> temp[i]; } for(int i=0; i<8; i++){ buffer[i] = static_cast<uint8_t>(temp[i]); } for(int i=0; i<8; i++){ cout << static_cast<uint32_t>(buffer[i]); if(i<7){ cout << " "; } } return 0; }
Test Cases
Test Results
Input
10 20 30 40 50 60 70 80
Expected Output