Mini Fish
Statement
Goal
Fish, also known as(Hexadecimal interpretation, but think on converting it to a decimal. Eg: 9F | stack: {9, 15})
(Eg: 9n | stack: {} | stdout: 9)
(Eg: 9A+n | stack: {} | stdout: 19)
(Eg: 9A-n | stack: {} | stdout: -1)
{9, 10}
| |
V V
9 - 10 = -1
(Eg 9A*n | stack: {} | stdout: 90)
Characters not present above to be ignored.
If there is no output, print "
If the stack doesn't have enough values to perform an operation
(Eg: 9+ |
Input
Line 1 n: the length of the code/input.
Line 2 ins: the source code to interpret.
Line 2 ins: the source code to interpret.
Output
Output if present, else "none ".
Constraints
0 <
The stack will be populated maximum by 50 values.
n<= 50
The stack will be populated maximum by 50 values.
Example
Input
8 FFDD+++n
Output
56
Game modes
Fastest, Shortest
Test cases
Get you started Test
Input
8
FFDD+++n
Output
56
Validator 1 Validator
Input
14
AEFD634++++++n
Output
65
Countdown oO Test
Input
12
09+n91-n92-n
Output
987
Validator 2 Validator
Input
14
5n51-n52-n53-n
Output
5432
NO FISHES IN THE POND (╯°□°)╯︵ ┻━┻ Test
Input
25
92+n1()()234()()++&()+n1+
Output
no fishes
Validator 3 Validator
Input
43
123#4+++&^%$234++()()n123()()(((())))++@++n
Output
no fishes
NONE Test
Input
24
ED3*2E3F-B68A0*47DEF+BBA
Output
none
Validator 4 Validator
Input
28
8CF4AC962131+8C+028DE4EFAAC4
Output
none
Solution language
Solution
Stub generator input