Divisible subarrays problem

it is showing segmentation fault . what is going wrong ?

hello @Raghavsingla522
image
declare them as long long.
if u still faces any problem then declare ur both array as global and then try

ok now it passed all the test cases but why do we need to declare these arrays as global ?

global scope can accomodate large memory than function level scope .
thats why