2 条题解

  • 0
    @ 2026-8-18 20:02:47

    提示:这题直接输出样例就可以拿50分

    • 0
      @ 2026-4-1 13:49:36

      提示:不开 long long 见祖宗!

      $(77777777777777777777)_8=1152921504606846975\approx 10^{20}$

      #include<bits/stdc++.h>
      #define int long long
      using namespace std;
      string s;
      int n_ten(int n,string s){
          int ans=0,w=1;
          reverse(s.begin(),s.end());
          for(char c:s){
              int sc=(int)(c-(isdigit(c)?'0':'7'));
              ans+=w*sc;
              w*=n;
          }
          return ans;
      }
      
      signed main(){
          ios::sync_with_stdio(0);
          cin.tie(0),cout.tie(0);
          cin>>s;
          cout<<n_ten(8,s);
          return 0;
      }
      
      • 1

      信息

      ID
      5641
      时间
      1000ms
      内存
      256MiB
      难度
      1
      标签
      递交数
      31
      已通过
      20
      上传者