comefrom: <awangdev>299. Bulls and Cows_1.java
code: public String getHint(String secret, String guess) {
          if (secret == null || guess == null || secret.length() == 0 || guess.length() == 0) {
              return "0A0B";
          }
          
          int[] nums = new int[10]; 
          int bulls = 0, cows = 0;
  
          for (int i = 0; i < secret.length(); i++) {
              int s = Character.getNumericValue(secret.charAt(i));
              int g = Character.getNumericValue(guess.charAt(i));
              if (s == g) {
                  bulls++;
              } else {
                  if (nums[s] < 0) cows++;
                  if (nums[g] > 0) cows++;
                  nums[s]++;
                  nums[g]--;
              }
          }
  
          return String.format("%sA%sB", bulls, cows);
      }
masked: public String var_0 ( String var_1 , String var_2 ) {
    if ( var_1 == null || var_2 == null || var_1 . length ( ) == 0 || var_2 . length ( ) == 0 ) {
      return "0A0B" ;
    }
    int [ ] var_3 = new int [ 10 ] ;
    int var_4 = 0 , var_5 = 0 ;
    for ( int var_6 = 0 ;
    var_6 < var_1 . length ( ) ;
    var_6 ++ ) {
      int var_7 = Character . getNumericValue ( var_1 . charAt ( var_6 ) ) ;
      int var_8 = Character . getNumericValue ( var_2 . charAt ( var_6 ) ) ;
      if ( var_7 == var_8 ) {
        var_4 ++ ;
      }
      else {
        if ( var_3 [ var_7 ] < 0 ) var_5 ++ ;
        if ( var_3 [ var_8 ] > 0 ) var_5 ++ ;
        var_3 [ var_7 ] ++ ;
        var_3 [ var_8 ] -- ;
      }
    }
    return String . format ( "%sA%sB" , var_4 , var_5 ) ;
  }
  