Commits

Shlomi Fish committed fbd9f94

Add problem #93.

Comments (0)

Files changed (1)

project-euler/93/93.pl

 use strict;
 use warnings;
 
+=head1 DESCRIPTION
+
+By using each of the digits from the set, {1, 2, 3, 4}, exactly once, and making use of the four arithmetic operations (+, −, *, /) and brackets/parentheses, it is possible to form different positive integer targets.
+
+For example,
+
+8 = (4 * (1 + 3)) / 2
+14 = 4 * (3 + 1 / 2)
+19 = 4 * (2 + 3) − 1
+36 = 3 * 4 * (2 + 1)
+
+Note that concatenations of the digits, like 12 + 34, are not allowed.
+
+Using the set, {1, 2, 3, 4}, it is possible to obtain thirty-one different target numbers of which 36 is the maximum, and each of the numbers 1 to 28 can be obtained before encountering the first non-expressible number.
+
+Find the set of four distinct digits, a < b < c < d, for which the longest set of consecutive positive integers, 1 to n, can be obtained, giving your answer as a string: abcd.
+
+=cut
+
 use IO::Handle;
 use Data::Dumper;
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.