I am not getting the correct output

question is to find the no of subarrays devisible by n where n is the size of the array

hello @tAkshat
image

use long long here
and dont print ans in line no 38.

print ans outside the loop