Bitset

#include <iostream>
#include <stack>
using namespace std;

int main()
{
	stack<int> s;
	int n;
	while(cin >> n)
	{
		while(n)
		{
			s.push(n % 2);
			n /= 2;
		}
		while(!s.empty())
		{
			cout << s.top();
			s.pop();
		}
		cout << endl;
	}
	
	return 0;
}

  

posted @ 2019-08-03 12:30  青衫客36  阅读(174)  评论(0编辑  收藏  举报