<qiyuangong>482_License_Key_Formatting_1.java
public String licenseKeyFormatting(String s, int k) {
        StringBuilder sb = new StringBuilder();
        for (int i = s.length() - 1; i >= 0; i--)
            if (s.charAt(i) != '-')
                sb.append(sb.length() % (k + 1) == k ? '-' : "").append(s.charAt(i));
        return sb.reverse().toString().toUpperCase();
    }
public String var_0 ( String var_2 , int var_3 ) {
  StringBuilder var_5 = new StringBuilder ( ) ;
  for ( int var_8 = var_2 . length ( ) - 1 ;
  var_8 >= 0 ;
  var_8 -- ) if ( var_2 . charAt ( var_8 ) != '-' ) var_5 . append ( var_5 . length ( ) % ( var_3 + 1 ) == var_3 ? '-' : "" ) . append ( var_2 . charAt ( var_8 ) ) ;
  return var_5 . reverse ( ) . toString ( ) . toUpperCase ( ) ;
}
