logn x^y solution