Create 1263.cpp

pull/1/head
Kirigaya Kazuto 2016-04-10 17:34:40 +08:00
parent 3663826a89
commit 5320c6648f
1 changed files with 29 additions and 0 deletions

29
QUSTOJ/1263.cpp Normal file
View File

@ -0,0 +1,29 @@
#include <iostream>
#include <bitset>
#include <string>
#include <sstream>
using namespace std;
int main()
{
int n,i;
string str;
while(cin>>n)
{
const int LEN=sizeof(int)*8;
bitset<LEN> a(n);
ostringstream p;
p<<a;
str=p.str();
int length=str.size();
for(i=0;i<length;i++)
{
if(str[i]!='0')
{
break;
}
}
cout<<str.c_str()+i<<endl;
}
return 0;
}