LeetCode974.和可被K整除的子数组

题目来源:

https://leetcode-cn.com/problems/subarray-sums-divisible-by-k/

题目描述:

LeetCode974.和可被K整除的子数组_第1张图片
 

class Solution {
    public int subarraysDivByK(int[] A, int K) {
        int[] map = new int[K];
        map[0]=1;
        int count =0;
        int remainder=0;
        for(int i=0;i

 

你可能感兴趣的:(LeetCode)