Help me in solving LBJ208A problem

My issue

please give me a solution to this code

My code

// Step 1: Read and understand the problem statement and sample test cases

// Click on Next once you are ready to proceed.



Learning course: Beginner DSA in Java
Problem Link: CodeChef: Practical coding for everyone

@yuvaraj_21

Correct Answer(s):

For N = 10 and M = 10, the number of extra shoes that Chef has to buy is 10.
For N = 5 and M = 10, the number of extra shoes that Chef has to buy is 5.
For N = 15 and M = 10, the number of extra shoes that Chef has to buy is 20.
Explanation:
N = 10
M = 10
Chef has 10 left shoes, only 10 right shoes are needed
The number of extra shoes that Chef has to buy is 10.

N = 5
M = 10
Chef has 10 left shoes, but no right shoes. So 5 right shoes are needed.
The number of extra shoes that Chef has to buy is 5.

N = 15
M = 10
Chef has 10 left shoes. To have 15 pairs, Chef needs 5 left shoes and 15 right shoes. So 20 shoes in total.
The number of extra shoes that Chef has to buy is 20.