进制转换
#include <iostream>
using namespace std;
int main()
{
string s = "", table = "0123456789ABCDEF";
long long M = 0, N = 0;
cin >> M >> N;
if( M == 0)
{
s ="0";
}
while( M )
{
if( M < 0 )
{
M = -M;
cout << "-";
}
s = table[M % N] + s;
M /= N;
}
cout << s << endl;
return 0;
}