Added 3 versions for the exponentiation problem