Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
20792 | 董承诺 | 8进制转10进制 | C++ | Accepted | 100 | 0 MS | 256 KB | 216 | 2021-06-20 11:53:21 |
#include<bits/stdc++.h> using namespace std; string s; long long ans; long long q=1; // 32 int main(){ cin>>s; for(int i=s.size()-1;i>=0;i--){ ans+=(s[i]-'0')*q; q*=8; } cout<<ans; return 0; }