3 solutions

  • 0
    @ 2026-5-2 9:47:03

    #include<bits/stdc++.h> using namespace std; int main() { int x; cin>>x; int n=8; string s; while(x) { int t=x%n; if(t<10) s=s+char(x%n+'0'); else s=s+char(t-10+'A'); x/=n; } reverse(s.begin(),s.end()); cout<<s; return 0; }

    Information

    ID
    2851
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    1
    Tags
    # Submissions
    34
    Accepted
    13
    Uploaded By