题解 | 八进制
#include <bits/stdc++.h>
using namespace std;
int main(){
long long x;
while(cin>>x){
string s="";
while(x!=0){
s.push_back(x%8+'0');
x/=8;
}
reverse(s.begin(),s.end());
cout<<s<<endl;
}
}
简单进制转换
查看9道真题和解析
阿里巴巴公司氛围 652人发布