WA in Not all Flavours

Can anyone please help me in figuring out why the code below is giving WA:

Hi @sipun

Check your code for the following test case :
5 3
1 1 1 1 1
It should give 5 but it’s giving 0 as the output

1 Like

Thanks. Its done now.