Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: SnowAveNode
Problemset: แปลงเลขฐาน
Language: cpp
Time: 0.002 second
Submitted On: 2025-09-19 18:02:37
#include<bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false); cin.tie(nullptr);
string hex; cin >> hex;
unsigned long long x = stoull(hex, nullptr, 16);
string bin = bitset<64>(x).to_string();
bin.erase(0, bin.find_first_not_of('0'));
if (bin.empty()) bin = "0";
cout << bin << "\n" << oct << x << "\n";
}