提交时间:2023-12-30 08:12:03
运行 ID: 118341
# 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 ; }