Project Euler/29: Difference between revisions
From charlesreid1
(Created page with "==Problem Statement== Consider integer combinations of a^b for 2 <= a <= 5 and 2 <= b <= 5: There are 16 distinct powers, but they make 15 distinct numbers (2^4 and 4^2 are...") |
|||
| Line 6: | Line 6: | ||
How many distinct terms are generated by a^b for 2 <= a <= 100 and 2 <= b <= 100? | How many distinct terms are generated by a^b for 2 <= a <= 100 and 2 <= b <= 100? | ||
==Solution== | |||
Code: https://git.charlesreid1.com/cs/euler/src/branch/master/java/Problem029.java | |||
==Flags== | |||
{{ProjectEulerFlag}} | |||
Latest revision as of 12:43, 19 April 2025
Problem Statement
Consider integer combinations of a^b for 2 <= a <= 5 and 2 <= b <= 5:
There are 16 distinct powers, but they make 15 distinct numbers (2^4 and 4^2 are both the same)
How many distinct terms are generated by a^b for 2 <= a <= 100 and 2 <= b <= 100?
Solution
Code: https://git.charlesreid1.com/cs/euler/src/branch/master/java/Problem029.java
Flags