The Lucky Dice

Ray and Evangeline are playing a game named “The Lucky Dice”. In this game, each player tosses up an…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

Can you give an explaination of the editorial?

Logic:
In 1 turn you expect the highest value which is L+N-1 and you also want your opponent to have the lowest value which is L. So, you get your answer for a single play is res=L+L+N-1. And for k plays, the total sum is k*res.