Subarray sum equals k

Hey Logical Coder,
Can you plz provide me the testcase where my code gets WA.
it shows TestCase0 as a WA

https://ide.codingblocks.com/s/618093 this is my code

Hi Adarsh,
just make the ans variable and return type of function as long long int instead of int… it will pass all test cases…
corrected code --> https://ide.codingblocks.com/s/618121

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.