C++ 代码
#include<bits/stdc++.h>
using namespace std;
int main(){
int num;
char c[13] = {'0','1','2','3','4','5','6','7','8','9','A','B','C'};
cout<<"#";
for(int i = 0;i<3;i++){
int ans[30],cnt=0;
cin>>num;
do{
ans[cnt++] = num%13;
num/=13;
}while(num!=0);
if(cnt==1) cout<<"0";
for(int j=cnt-1;j>=0;j--) cout<<c[ans[j]];
}
return 0;
}
%%%