#include <iostream>
#include <vector>
#include <limits>
int main()
{
const std::vector<int> digits = { 1, 3, 0, 9, 8, 7, 2, 5 } ;
if( digits.size() > std::numeric_limits<int>::digits10 )
{
std::cerr << "possible overflow\n" ;
return 1 ;
}
int number = 0 ;
for( int v : digits )
{
if( v<0 || v>9 )
{
std::cerr << "invalid decimal digit\n" ;
return 1 ;
}
number *= 10 ;
number += v ;
}
std::cout << number << '\n' ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8bGltaXRzPgoKaW50IG1haW4oKQp7CiAgICBjb25zdCBzdGQ6OnZlY3RvcjxpbnQ+IGRpZ2l0cyA9IHsgMSwgMywgMCwgOSwgOCwgNywgMiwgNSB9IDsKICAgIGlmKCBkaWdpdHMuc2l6ZSgpID4gc3RkOjpudW1lcmljX2xpbWl0czxpbnQ+OjpkaWdpdHMxMCApCiAgICB7CiAgICAgICAgc3RkOjpjZXJyIDw8ICJwb3NzaWJsZSBvdmVyZmxvd1xuIiA7CiAgICAgICAgcmV0dXJuIDEgOwogICAgfQoKICAgIGludCBudW1iZXIgPSAwIDsKICAgIGZvciggaW50IHYgOiBkaWdpdHMgKQogICAgewogICAgICAgIGlmKCB2PDAgfHwgdj45ICkKICAgICAgICB7CiAgICAgICAgICAgIHN0ZDo6Y2VyciA8PCAiaW52YWxpZCBkZWNpbWFsIGRpZ2l0XG4iIDsKICAgICAgICAgICAgcmV0dXJuIDEgOwogICAgICAgIH0KICAgICAgICBudW1iZXIgKj0gMTAgOwogICAgICAgIG51bWJlciArPSB2IDsKICAgIH0KICAgIHN0ZDo6Y291dCA8PCBudW1iZXIgPDwgJ1xuJyA7Cn0K