PAT1027. Colors in Mars (20)

#include <iostream>

using namespace std;
string tbl="0123456789ABC";
int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	int al=a%13,ah=a/13;
	int bl=b%13,bh=b/13;
	int cl=c%13,ch=c/13;
	cout<<"#";
	cout<<tbl[ah]<<tbl[al];
	cout<<tbl[bh]<<tbl[bl];
	cout<<tbl[ch]<<tbl[cl];

	return 0;
}

  

posted @ 2016-03-22 16:56  Yellowman  阅读(103)  评论(0)    收藏  举报
TVRBMExqRXlPQzR5TXpjdU1UVTEK\n