Pergunta de entrevista da empresa Two Sigma

Calculate compound interest over years given the principal amount