Pergunta de entrevista da empresa athenahealth

convert a number into binary form and find if it is periodic