yaworsw/euler-manager

View on GitHub
data/problems/93.yml

Summary

Maintainability
Test Coverage
---
:id: 93
:name: Arithmetic expressions
:url: https://projecteuler.net/problem=93
:content: "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.\n\nFor example,\n\n8
  = (4 \\* (1 + 3)) / 2  \n14 = 4 \\* (3 + 1 / 2)  \n19 = 4 \\* (2 + 3) − 1  \n36
  = 3 \\* 4 \\* (2 + 1)\n\nNote that concatenations of the digits, like 12 + 34, are
  not allowed.\n\nUsing 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.\n\nFind
  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_.\n\n"