#include <iostream>
#include <string>
int main()
{
std::string s = "5f0066";
int num = std::stoi(s, 0, 16);
std::cout << "value in decimal = " << num << '\n';
std::cout << "value in hexadecimal = " << std::hex << num << '\n';
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgogCmludCBtYWluKCkKewogICAgc3RkOjpzdHJpbmcgcyA9ICI1ZjAwNjYiOwogICAgaW50IG51bSA9IHN0ZDo6c3RvaShzLCAwLCAxNik7CgogICAgc3RkOjpjb3V0IDw8ICJ2YWx1ZSBpbiBkZWNpbWFsICAgICA9ICIgPDwgbnVtIDw8ICdcbic7CiAgICBzdGQ6OmNvdXQgPDwgInZhbHVlIGluIGhleGFkZWNpbWFsID0gIiA8PCBzdGQ6OmhleCA8PCBudW0gPDwgJ1xuJzsKfQ==