| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 9752 | 袁梦琪 | 8进制转10进制 | C++ | Accepted | 100 | 0 MS | 268 KB | 247 | 2020-11-18 18:55:22 |
#include<bits/stdc++.h> using namespace std; int main(){ char c[100000]; int eight=0,ten=0,k=0; cin>>eight; while(eight){ c[k]=eight%10; eight/=10; k++; } for(int i=0;i<=k;i++) ten+=pow(8,i)*c[i]; cout<<ten; return 0; }