-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'd1a92281842c99164515e142bae72734b1675375' into samdebacker
- Loading branch information
Showing
5 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/test/scala/org/bescala/projecteuler/problems/Problem004.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.bescala.projecteuler.problems | ||
|
||
|
||
import org.bescala.projecteuler.EulerSuite | ||
import org.bescala.projecteuler.ProjectEuler._ | ||
|
||
class Problem004 extends EulerSuite { | ||
|
||
/** | ||
* A palindromic number reads the same both ways. The largest palindrome made from the product | ||
* of two 2-digit numbers is 9009 = 91 x 99. | ||
* | ||
* Task: Find the largest palindrome made from the product of two 3-digit numbers. | ||
* | ||
* Note: The stated problem can be solved for numbers with a larger number of digits. | ||
* | ||
* For example, for 5 digit numbers, the largest palindrome is 9966006699 = 99681 * 99979 and | ||
* this solution can be determined programmatically in under a second. | ||
* | ||
* In fact, it is possible to calculate the value of these palindrome for the product of two | ||
* numbers up-to 8 digits in around 5 seconds. | ||
* | ||
* Finding the right strategy for finding a fast solution is not straightforward. Use experiments to | ||
*find a good strategy. The 'fast' solution doesn't require tons of math... | ||
* | ||
*/ | ||
euler(problem(4)) { | ||
TODO | ||
} | ||
} |