#31887: cpp ans


jasontw77661@gmail.com (Jason Chang)


#include <iostream>
#include <stack>

using namespace std;

int main() {
    int n,temp;
    stack<int> st;
    while(cin >> n){
    while(n != 1){
            temp = n % 2;
            st.push(temp);
            n = n / 2;
    }
    cout << n;
    while( !st.empty() ) {
        int &tmp = st.top();
        printf("%d", tmp);
        st.pop();
    }
    cout << endl;
    }
}