Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
118341 梁乃元 十进制转d进制 C++ 解答错误 50 0 MS 252 KB 278 2023-12-30 08:12:03

Tests(5/10):


# include <iostream> using namespace std ; char i2c ( int x ) { return '0' + ( x - 0 ) ; } int main ( ) { int a , b ; cin >> a >> b ; string s ; while ( a != 0 ) { s = i2c ( a % b ) + s ; a -= a % b ; a /= b ; } cout << s << endl ; return 0 ; }


测评信息: