I can understand why this code is giving wrong ans for testcase 2.Please correct my code and share the code link
Divisible subarray tescase 2
hey @Shobhit-Gupta-10216154901204043, you forgot to consider the case, when sum becomes negative. Moreover you should take datatype as long long int.
here is your updated code https://ide.codingblocks.com/s/113022