Stock Exchange Losses puzzle discussion


I’m using a double for loop.I had a problem with overtime.


Hello good people :wink:

I am surprised what techniques people are using for this puzzle :wink:
I made with one simple loop. Makes me doubt in my code :wink:
Anyways, I pass all the tests, no problems but in final score i got 91% because of last test :confused:
Anyone willing to take a look and give some clues?