#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int bin[32];
int idx = 0;
int temp = N;
if (temp == 0) {
bin[idx++] = 0;
}
while (temp > 0) {
bin[idx] = temp % 2;
temp /= 2;
idx++;
}
cout << "2 ";
for (int i = idx - 1; i >= 0; i--) {
cout << bin[i];
}
cout << "\n";
cout << "8 " << oct << N << "\n";
cout << "16 " << hex << uppercase << N << "\n";
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: