Sort the tasks according to the required_time_needed_to_finish.
For each task, sum up the required days consecutively.
Find out the remaining days for each task by subtracting the required_total_days from Days_Needed_To_Finish for that task and then multiply the result by 10.
Add this to the total result.