Problem in understanding the stock selling problem

If I buy the stock 23 on day one and sell it on day 5 it would be 115 which is more than 16.

I am not able to access the problem statement. Please paste it here so that i can check and explain.

You are a trader who wants to earn profit by selling stocks. Also, you are given an array ‘a’ which tells you about the stock price for a particular stock for upcoming n days. In between these n days, you can make at most ‘k’ transactions of buying and selling , such that no transaction overlap each other. Input Format 1st Line: t, number of test cases Next t lines will have, k, denoting the number of transactions n, denoting the length of array ‘a’ space separated values of array ‘a’

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.