Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: NovemNotes
Problemset: แปลงเลขฐาน
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-15 10:05:55
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);
int n;cin >> hex >> n;
int m = n;
string bit="";
while(m){
bit+=to_string(m%2);
m/=2;
}
reverse(bit.begin(),bit.end());
cout << bit << "\n";
cout << oct << n << "\n";
return 0;
}