Help needed

any kind of help or logic will be appreciated

It is equal to the number of contigous sums that add up to k.