puzzles/maximum-profit
Zoé Cassiopée Gauthier 7e4f02547b Initial commit
2024-04-02 17:01:09 -04:00
..
maximum_profit.py Initial commit 2024-04-02 17:01:09 -04:00
MAXPROFIT.BAS Initial commit 2024-04-02 17:01:09 -04:00
README.md Initial commit 2024-04-02 17:01:09 -04:00

Maximum profit

Puzzle from rendezvous with cassidoo newsletter, July 23rd 2023.

Implementation in ANSI BASIC with prototype in Python.

Solution posted at https://strangeobject.space/@ooze/110770674393278897

How to run

Edit the last DATA statement from the MAXPROFIT.BAS file to specify the sequence. Update the loop counter on line 20 to the number of elements in that sequence.

Running the code requires a BASIC intepreter such as Bywater BASIC (bwBASIC). For example, on Ubuntu, Debian, or Pop! OS systems, it can be installed from apt install bwbasic.

bwbasic MAXPROFIT.BAS

Exit the interactive environment by typing Ctrl-D.