大家来复制
2026-08-28 16:00:16
发布于:广东
6阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
if(n==0){
cout<<0;
return 0;
}
string s;
string q;
while (n!=0) {
s+=n%8+'0';
n /= 8;
}
for(int i = s.length()-1;i>=0;i--){
cout<<s[i];
}
return 0;
}
这里空空如也


有帮助,赞一个