- Read the Question very carefully in the 1st chance.
- Look at the Input and Output Format of the program.
- Look at the constraints of the program.
- Choose your programming language.
- Set the conditions.
- Start Coding.
- Check Public test cases are passed or not?
- Then check Private test cases are passed or not?
Niti and Samy Soft Drink Party
Niti and Samy are the two friends. They are invited in a party. Niti is offered ‘a’ number of soft drinks of X brand and Samy is offered ‘b’ number of soft drinks of Y brand.
But here is a problem that Niti does not prefer X brand and Samy does not prefer Y brand.
Niti prefers Y brand and Sami Prefers X brand. They decide to switch their drinks to each other and Niti will take one more of her preferred brand and Samy will also take two more of her preferred brand. So at the end of the party how many number of drinks will be to Niti and Samy?