why is the following code giving WA (ques: CHARGES from May Lunchtime 2021)
LINK to Solution: CodeChef: Practical coding for everyone
why is the following code giving WA (ques: CHARGES from May Lunchtime 2021)
LINK to Solution: CodeChef: Practical coding for everyone
Check out this testcase
1
1 3
0
1 1 1
Hi ,
You have ignored if number of charges is 1.
If it is 1 then answer will always be zero