标签:stream ring include return cout ace while using ios
#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;
}
标签:stream ring include return cout ace while using ios
原文地址:https://www.cnblogs.com/mcyushao/p/10682595.html