The 5-digit number, 16807=75, is also a fifth power. Similarly, the 9-digit number, 134217728=89, is a ninth power.
How many positive integers are of length n and an nth power?
Information at Project Euler 063
Getting Started
Select Show Solution to Show the Solution. Select Hide Solution to Hide the Solution. When the solution is shown, the number of positive integers of length 1, 2, 3, 4, 5, 6, 7, 8, 10 and 21 are given.
User Stories
As a user, I can show or hide the solution by selecting the appropriate button.
As a user, I expect the function powerfulDigitCounts(1)
to return a number.
As a user, I expect the function powerfulDigitCounts(1)
to return 9.
As a user, I expect the function powerfulDigitCounts(2)
to return 6.
As a user, I expect the function powerfulDigitCounts(3)
to return 5.
As a user, I expect the function powerfulDigitCounts(4)
to return 4.
As a user, I expect the function powerfulDigitCounts(5)
to return 3.
As a user, I expect the function powerfulDigitCounts(6)
to return 3.
As a user, I expect the function powerfulDigitCounts(7)
to return 2.
As a user, I expect the function powerfulDigitCounts(8)
to return 2.
As a user, I expect the function powerfulDigitCounts(10)
to return 2.
As a user, I expect the function powerfulDigitCounts(21)
to return 1.
User Stories on function powerfulDigitCounts(n)
taken from FreeCodeCamp - Coding Interview Prep - Project Euler 063
Information Architecture
The function powerfulDigitCounts(n)
returns a number, where n
is a number.
Allows the user to show or hide the solution to the problem as described in FreeCodeCamp - Coding Interview Prep - Project Euler 063.
Extensions include the count of all n-digit numbers which are nth power.
Uses HTML5, CSS3, JavaScript, Bootstrap 5.2.3 and Google Fonts.
Ensure all user stories have been met.
Deployed on GitHub Pages at the main branch.
Written by me.