TrinaryNumber
TimeLimit:1000MS
Description
Maybeyouwanttoask"Whatisthetrinarynumbers?"Forexample,Binaryisbasedontwo,whilethedecimalnumberisbasedonten,sothetrinarynumberisbasedonthree.Forexample,thedecimalnumber3is10intrinaryform.Yourtask,itistotransformafractionwhichbepresentedintheform'x/y'andthevalueislimitedin0to1intotrinaryform.
Input
ThefirstlineoftheinputcontainsasingleintegerT(0