Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
20793 | 张承志 | 8进制转10进制 | C++ | Accepted | 100 | 0 MS | 264 KB | 216 | 2021-06-20 11:53:40 |
#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; }