Problem
A company has N project proposals. Each project has an expected ROI (return on investment) — a number that can be positive or negative.
You want to maximise total profit. A project with negative ROI loses money, so you should skip it.
Select all projects with positive ROI and output the total profit. If no project is profitable, output 0.
You want to maximise total profit. A project with negative ROI loses money, so you should skip it.
Select all projects with positive ROI and output the total profit. If no project is profitable, output 0.
Input Variables (pre-loaded)
💡 Drag N and ROI of project i from the Inputs category.
Your Output
Result
—
Run your program to see the result.
Execution Log
Ready. Press ▶ Run to start.
Expected Answer
Answer:
?
Hint
Step 0