<garvit244>115_1.py
def numDistinct( s, t):
    row, col = len(s), len(t)
    
    if col > row:
        return 0
    
    dp = [[0 for _ in range(col+1)] for _ in range(row+1)]
    
    for r in range(row+1):
        for c in range(col+1):
            if r == 0 and c == 0:
                dp[r][c] = 1
            elif r == 0:
                dp[r][c] = 0
            elif c == 0:
                dp[r][c] = 1
            else:
                dp[r][c] = dp[r-1][c]
                if s[r-1] == t[c-1]:
                    dp[r][c] += dp[r-1][c-1]
    return dp[row][col]
def sample_funcname ( var_0 , var_1 ) :
    var_3 , var_4 = len ( var_0 ) , len ( var_1 )
    if var_4 > var_3 :
        return 0
    var_9 = [ [ 0 for var_6 in range ( var_4 + 1 ) ] for var_6 in range ( var_3 + 1 ) ]
    for var_10 in range ( var_3 + 1 ) :
        for var_11 in range ( var_4 + 1 ) :
            if var_10 == 0 and var_11 == 0 :
                var_9 [ var_10 ] [ var_11 ] = 1
            elif var_10 == 0 :
                var_9 [ var_10 ] [ var_11 ] = 0
            elif var_11 == 0 :
                var_9 [ var_10 ] [ var_11 ] = 1
            else :
                var_9 [ var_10 ] [ var_11 ] = var_9 [ var_10 - 1 ] [ var_11 ]
                if var_0 [ var_10 - 1 ] == var_1 [ var_11 - 1 ] :
                    var_9 [ var_10 ] [ var_11 ] += var_9 [ var_10 - 1 ] [ var_11 - 1 ]
    return var_9 [ var_3 ] [ var_4 ]
