这道题如果测试点过不去就要考虑0这种特殊情况 以及10-13数字对应A-C能不能正确表示
贴ac代码
#include<iostream>
using namespace std;
char get(int x)
{
if(x>9) return x-10+'A';
else return x+'0';
}
int main()
{
int num;
cout<<"#";
while(cin>>num&&num>=0)
{
string res;
res=res+get(num/13)+get(num%13);
cout<<res;
}
return 0;
}