1 条题解

  • 1
    @ 2023-6-6 18:14:07
    #include <iostream>
    #include <stack>
    using namespace std;
    int main()
    {
        int num;
        cin >> num;
        stack<int> s;
        while (num)
        {
            s.push(num % 8);
            num /= 8;
        }
        if (s.empty())
        {
            cout << 0;
        }
        while (!s.empty())
        {
            cout << s.top();
            s.pop();
        }
        return 0;
    }
    
    • 1

    信息

    ID
    1211
    时间
    1000ms
    内存
    128MiB
    难度
    2
    标签
    递交数
    90
    已通过
    57
    上传者