#include <iostream>
void printInBinary(unsigned int num)
{
unsigned int tmp = num;
unsigned char size = 0;
while (tmp)
{
tmp /= 2;
++size;
}
for (char i = size - 1; i >= 0; --i)
{
std::cout << (num >> i)%2;
}
}
int main() {
printInBinary(5000);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdm9pZCBwcmludEluQmluYXJ5KHVuc2lnbmVkIGludCBudW0pCnsKCXVuc2lnbmVkIGludCB0bXAgPSBudW07Cgl1bnNpZ25lZCBjaGFyIHNpemUgPSAwOwoJd2hpbGUgKHRtcCkKCXsKCQl0bXAgLz0gMjsKCQkrK3NpemU7Cgl9CgkKCWZvciAoY2hhciBpID0gc2l6ZSAtIDE7IGkgPj0gMDsgLS1pKQoJewoJCXN0ZDo6Y291dCA8PCAobnVtID4+IGkpJTI7Cgl9Cn0KCmludCBtYWluKCkgewoJcHJpbnRJbkJpbmFyeSg1MDAwKTsKCQoJcmV0dXJuIDA7Cn0=