题解 | #八进制#
八进制
http://www.nowcoder.com/practice/eda051c1effc4dffa630bc8507f0c5f7
//同二进制题目 #include<iostream> #include<string> #include<vector> using namespace std; void Convert(int n) { vector<int> answer; while(n!=0) { answer.push_back(n%8); n/=8; } for(int i=answer.size()-1;i>=0;--i) { printf("%d",answer[i]); } printf("\n"); } int main() { int n; while(scanf("%d",&n)!=EOF) { Convert(n); } return 0; }