/*
 * Author: Luca Risolia
 *
 * Created on 16th August 2010
 */

#include <iostream>
#include <vector>

using namespace std;

void print(int value, int base = 10) {
    vector<char> v;
    for (char c; value != 0; value /= base) {
        c = value % base;
        if (c >= 10)
            c += 'a' - 10;
        else
            c += '0';
        v.push_back(c);
    }
    for (int i = v.size() - 1; i >= 0; i--)
        cout << v[i];
}

int main(int argc, char** argv) {
    print(255, 2);
    cout << '\n';
    print(255, 16);
    cout << '\n';
    return 0;
}

