<doocs>0299.Bulls and Cows_1.py
def getHint( secret: str, guess: str) -> str:
    x = y = 0
    cnt1 = [0] * 10
    cnt2 = [0] * 10
    for i in range(len(secret)):
        if secret[i] == guess[i]:
            x += 1
        else:
            cnt1[int(secret[i])] += 1
            cnt2[int(guess[i])] += 1
    
    for i in range(10):
        y += min(cnt1[i], cnt2[i])
    return f'{x}A{y}B'
def sample_funcname ( var_0 : str , var_2 : str ) -> str :
    var_5 = var_3 = 0
    var_7 = [ 0 ] * 10
    var_8 = [ 0 ] * 10
    for var_11 in range ( len ( var_0 ) ) :
        if var_0 [ var_11 ] == var_2 [ var_11 ] :
            var_5 += 1
        else :
            var_7 [ int ( var_0 [ var_11 ] ) ] += 1
            var_8 [ int ( var_2 [ var_11 ] ) ] += 1
    for var_11 in range ( 10 ) :
        var_3 += min ( var_7 [ var_11 ] , var_8 [ var_11 ] )
    return f'{var_5}A{var_3}B'
