Code failing one test case in Divisible Subarrays Question

Why this code of Divisible Subarrays Question is failing on one test case (Test case 3). I have already taken care of negative numbers in my code

Link to Question - https://hack.codingblocks.com/app/practice/6/p/266

Link to my code -
https://ide.codingblocks.com/s/188888

@rahul31
hello rahul,
change ur vector datatype to long long .rest of ur code is correct,

Thanks I got it since (v[i](v[i]-1))/2 can overflow we have to either define a vector with long long or we have to typecast v[i] before doing (v[i](v[i]-1))/2. Thank you so much