comefrom: <awangdev>523. Continuous Subarray Sum_2.java
code: public boolean checkSubarraySum(int[] nums, int k) {
          if (nums == null || nums.length == 0) return false;
          int n = nums.length;
          int[] dp = new int[n]; 
          dp[0] = nums[0];
          for (int i = 1; i < n; i++) {
              dp[i] = dp[i - 1] + nums[i];
          }
          for (int i = 0; i < n; i++) {
              for (int j = i + 1; j < n; j++) {
                  int sum = dp[j] - dp[i] + nums[i];
                  if (sum == k || (k != 0 && sum % k == 0)) {
                      return true;
                  }
              }
          }
  
          return false;
      }
masked: public boolean var_0 ( int [ ] var_1 , int var_2 ) {
    if ( var_1 == null || var_1 . length == 0 ) return false ;
    int var_3 = var_1 . length ;
    int [ ] var_4 = new int [ var_3 ] ;
    var_4 [ 0 ] = var_1 [ 0 ] ;
    for ( int var_5 = 1 ;
    var_5 < var_3 ;
    var_5 ++ ) {
      var_4 [ var_5 ] = var_4 [ var_5 - 1 ] + var_1 [ var_5 ] ;
    }
    for ( int var_5 = 0 ;
    var_5 < var_3 ;
    var_5 ++ ) {
      for ( int var_6 = var_5 + 1 ;
      var_6 < var_3 ;
      var_6 ++ ) {
        int var_7 = var_4 [ var_6 ] - var_4 [ var_5 ] + var_1 [ var_5 ] ;
        if ( var_7 == var_2 || ( var_2 != 0 && var_7 % var_2 == 0 ) ) {
          return true ;
        }
      }
    }
    return false ;
  }
  