Problem 53905. Easy Sequences 64: Base-14 Arithmetic Function
For an integer n, the base-14 arithmetic function,
, is defined as follows:
- Convert n to base-14, using the letters '
' for digits
to
.
- Replace the letters '
' with the arithmetic operation symbols '
', respectively.
- Remove any leading or trailing operation symbols.
- For consecutive operation symbols between two numeric symbols, retain only the first operation and remove all others.
- Evaluate the resulting expression in base-10.
- Return the evaluated expression as
, rounded-off to the nearest integer.
- Finally, output
if
contains only "operation symbols", or if
, or if
, or if
.
For example if
:
Therefore:
Given a set positive integers N, find the integer x,
, such that
is minimized. If there are more than one integers, x in N that minimizes
, please output the largest of those x's.
For example for
:
Therefore,
is minimized when
, for
. Since we are asked to select the largest minimizer, our program output should be
.
Solution Stats
Problem Comments
-
1 Comment
GeeTwo
on 15 Sep 2023
What a silly problem.
With inadequate statistical tests for the big cases
that I discovered by accident.
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
-
Find state names that end with the letter A
1186 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1200 Solvers
-
Extract Built In Functions and Toolbox Functions from String or Function Handle
76 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
1976 Solvers
-
Sum the elements in rows of the Levine triangle
12 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!