Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
339922 钟宜辰 【C6-2】正整数n转换为8进制 C++ 解答错误 0 2 MS 248 KB 199 2025-08-12 10:06:28

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int n; string s; char c; int main(){ cin>>n; if(n==0){ s="0"; } while(n>0){ c=n%8+'0'; s=c+s; n/=8; } cout<<s; return 0; }


测评信息: