2 条题解

  • 4
    @ 2023-8-3 23:13:45

    oj特色 题越简单人越少

    已AC,放心食用

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        string s;
        cin>>s;
        long long num=0,i=s.size()-1,t=1;
        while(i>=0) {
            num+=(s[i]-'0')*t;
            t*=8;
            i--;
        }
        cout<<num<<endl;
        return 0;
    }
    
    • 1
      @ 2024-2-22 9:08:15

      最短代码:

      #include <iostream>
      #include <cstdio>
      using namespace std;
      int main()
      {
      unsigned int a;
      scanf("%o", &a);//以八进制输入整数
      cout << dec << a << endl;
      return 0;
      }
      
      • 1

      信息

      ID
      288
      时间
      1000ms
      内存
      16MiB
      难度
      1
      标签
      递交数
      45
      已通过
      33
      上传者