Powerful digit counts | Project Euler | Problem #63
URL to the problem page: https://projecteuler.net/problem=63 The 5-digit number, 16807=7⁵, is also a fifth power. Similarly, the 9-digit number, 134217728=8⁹, is a ninth power. How many n-digit positive integers exist which are also an nth power? #include <iostream> using namespace std ; unsigned long long power ( unsigned long long a , unsigned long long b ) { unsigned long long result = 1 , i; for (i = 0 ; i < b; i++) { result = result * a; } return result; } unsigned long long finddigits ( unsigned long long a ) { unsigned long long ...