Problem 63: Powerful digit counts

FCC link

The 5-digit number, 16807 = 75, is also a fifth power. Similarly, the 9-digit number, 134217728 = 89, is a ninth power.

Complete the function so that it returns how many positive integers are of length n and an nth power.

Test

{{test}}

Console output