Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: chypnx

Problemset: แปลงเลขฐาน

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-03 22:48:48

#include <bits/stdc++.h>
using namespace std;

int main(){
    int num;
    cin >> hex >> num;
    
    string bid = bitset<64>(num).to_string();
    bid.erase(0,bid.find_first_not_of('0'));
    
    cout << bid << endl;
    cout << oct << num;
    
    return 0;
}