PeopleinMarsrepresentthecolorsintheircomputersinasimilarwayastheEarthpeople.Thatis,acolorisrepresentedbya6-digitnumber,wherethefirst2digitsarefor Red,themiddle2digitsfor Green,andthelast2digitsfor Blue.Theonlydifferenceisthattheyuseradix13(0-9andA-C)insteadof16.Nowgivenacolorinthreedecimalnumbers(eachbetween0and168),youaresupposedtooutputtheirMarsRGBvalues.
InputSpecification:
Eachinputfilecontainsonetestcasewhichoccupiesalinecontainingthethreedecimalcolorvalues.
OutputSpecification:
ForeachtestcaseyoushouldoutputtheMarsRGBvalueinthefollowingformat:firstoutput #,thenfollowedbya6-digitnumberwherealltheEnglishcharactersmustbeupper-cased.Ifasinglecolorisonly1-digitlong,youmustprinta 0 toitsleft.
SampleInput:154371SampleOutput:#123456#include<iostream>#include<string>#include<sstream>#include<vector>#include<algorithm>#include<cmath>usingnamespacestd;//9:57intmain(){//freopen("C:\\Users\\chenzhuo\\Desktop\\in.txt","r",stdin);inta[3];cin>>a[0]>>a[1]>>a[2];chartmp[]={'0','1','2','3','4','5','6','7','8','9','A','B','C'};cout<<'#';stringa1[3]={"","",""};for(inti=0;i<3;i++){do{chark=tmp[a[i]%13];a1[i]=k+a1[i];a[i]/=13;}while(a[i]>0);}for(inti=0;i<3;i++){if(a1[i].size()==1)a1[i]='0'+a1[i];cout<<a1[i];}}