7539 while(cin >> input) {
7544 unsigned short promotion = 0;
7545 vector<unsigned short> result = vector<unsigned short>();
7546 vector<unsigned short> charvec = vector<unsigned short>(input.length());
7547 for(
auto i = 0; i < input.length(); i++) {
7548 charvec[i] = input[i] -
'0';
7550 vector<unsigned short> next = vector<unsigned short>();
7551 while(!charvec.empty() && !(charvec.size() == 1 && charvec[0] == 0)) {
7552 for(
unsigned short d: charvec) {
7553 unsigned short digit = promotion * 10 + d;
7554 if(digit / 2 > 0 || !next.empty()) {
7555 next.push_back(digit / 2);
7557 promotion = digit % 2;
7559 result.push_back(promotion);
7564 for(
auto i = result.rbegin(); i != result.rend(); i++) {