How to know if a is included or not

Sir how do we understand if we have to do csum[b]-csum[a] or csum[b] -csum[a-1] because if we do second method then a is also included if it is prime.

Hey @adityamehrotra275
since both a and b are inclusive in range
we will do csum[b]-csum[a-1]

Hey @adityamehrotra275
You got it right ?

Yes Sir I got it Thanks

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.