#include <array>
#include <iostream>
#include <string>

std::string zip_to_postnet(const std::string& zip)
{
    std::array<std::string,10> lookup{"11000", "00011", "00101", "00110",
                                      "01001", "01010", "01100", "10001",
                                      "10010", "10100"};

    std::string result = "1";

    for (unsigned int i = 0; i < 5; ++i)
    {
        int digit = zip[i] - '0';
        result += lookup[digit];
    }

    return result + "1";
}

int main()
{
    std::cout << zip_to_postnet("24060") << std::endl;
    std::cout << zip_to_postnet("92064") << std::endl;
    std::cout << zip_to_postnet("11518") << std::endl;

    return 0;
}