#include <iostream>
#include <string>
#include <bitset>
using namespace std;
int main()
{
int n;
cin >> n;
bitset<16> b(n);
string s;
b._M_copy_to_string(s);
cout << s << endl;
return 0;
}
わけわからんからbitsetの中身を読んでこうしてやった。
自己解決しました。
解決はしてないけど