Buggy python submission (verdict: Runtime Error):
import sys
import time
import math
sys.setrecursionlimit(20000)
def update(tree,x,y,N):
    # happa no offset
    x += N
    tree[x] = y
    # segment tree no update suru
    while x>0:
        x = int((x - 1)/2)
        left = x*2+1
        right = x*2+2
        if(right > N):
            right = right - 1
        tree[x] = min(tree[left],tree[right])

def find(tree,x,y,k,l,r):
    # mitu kara nakatta
    if ( r <= x or y <= l):
        return 2**31 - 1
    # sita wo mite itte mitukatta toki (intersect)
    if ( x <= l and r <= y):
        #print(k,l,r)
        return tree[k]
    # sita ni sagaru
    v_left = find(tree, x, y, k*2 + 1, l, int((l+r)/2))
    v_right = find(tree, x, y, k*2 + 2, int((l+r)/2), r)
    return min(v_left, v_right)

if __name__ == '__main__':
    _N,query_num = map(int, input().split())
    INT_MAX = 2**31 - 1
    N = _N*2
    A_bin_tree = [INT_MAX]*(N)
    #start = time.time()
    for i in range(query_num):
        operate,x,y = map(int, input().split())
        # update
        if(operate==0):
            update(A_bin_tree,x,y,_N)
            #print(A_bin_tree)
        # find
        if(operate==1):
            # tyouten kara miteiku
            x = find(A_bin_tree,x,y+1,0,0,N)
            print(x)
    #elapsed_time = time.time() - start
    #print ("elapsed_time:{0}".format(elapsed_time) + "[sec]")



Fixed submission:
import sys
import time
import math
sys.setrecursionlimit(20000)
def update(tree,x,y,N):
    # offset
    #x += int(N/2)
    x += N - 1
    tree[x] = y
    # segment tree no update suru
    while True:
        if(x <= 0):
            break
        x = math.floor((x - 1)/2)
        left = x*2+1
        right = x*2+2
        tree[x] = min(tree[left],tree[right])

def find(tree,x,y,k,l,r):

    if (r <= x or y <= l):
        return 2**31 - 1
    # sita wo mite itte mitukatta toki (intersect)
    if ( x <= l and r <= y):
        return tree[k]
    # sita ni sagaru
    v_left = find(tree, x, y, k*2 + 1, l, int((l+r)/2))
    v_right = find(tree, x, y, k*2 + 2, int((l+r)/2), r)
    return min(v_left, v_right)

if __name__ == '__main__':
    _N,query_num = map(int, input().split())
    INT_MAX = 2**31 - 1
    N = 1
    while True:
        if(N >= _N):
            break
        N *= 2
    #N = 2*N - 1 - 1
    if not (N == 1):
        A_bin_tree = [INT_MAX]*(2*N - 1)
    else:
        A_bin_tree = [INT_MAX]
    #start = time.time()
    for i in range(query_num):
        operate,x,y = map(int, input().split())
        # update
        if(operate==0):
            update(A_bin_tree,x,y,N)
            #print(A_bin_tree)
        # find
        if(operate==1):
            # tyouten kara miteiku
            z = find(A_bin_tree,x,y+1,0,0,N)
            print(z)
    #elapsed_time = time.time() - start
    #print ("elapsed_time:{0}".format(elapsed_time) + "[sec]")

Buggy python submission (verdict: Runtime Error):
import sys
import time
import math
sys.setrecursionlimit(20000)
def update(tree,x,y,N):
    # offset
    #x += int(N/2)
    x += N - 1
    tree[x] = y
    # segment tree no update suru
    while x>0:
        x = math.floor((x - 1)/2)
        left = x*2+1
        right = x*2+2
        tree[x] = min(tree[left],tree[right])

def find(tree,x,y,k,l,r):

    if (r <= x or y <= l):
        return 2**31 - 1
    # sita wo mite itte mitukatta toki (intersect)
    if ( x <= l and r <= y):
        return tree[k]
    # sita ni sagaru
    v_left = find(tree, x, y, k*2 + 1, l, int((l+r)/2))
    v_right = find(tree, x, y, k*2 + 2, int((l+r)/2), r)
    return min(v_left, v_right)

if __name__ == '__main__':
    _N,query_num = map(int, input().split())
    INT_MAX = 2**31 - 1
    N = 1
    while True:
        if(N >= _N):
            break
        N *= 2
    #N = 2*N - 1 - 1
    A_bin_tree = [INT_MAX]*(2*N - 1 - 1)
    #start = time.time()
    for i in range(query_num):
        operate,x,y = map(int, input().split())
        # update
        if(operate==0):
            update(A_bin_tree,x,y,N)
            #print(A_bin_tree)
        # find
        if(operate==1):
            # tyouten kara miteiku
            z = find(A_bin_tree,x,y+1,0,0,N)
            print(z)
    #elapsed_time = time.time() - start
    #print ("elapsed_time:{0}".format(elapsed_time) + "[sec]")



Fixed submission:
import sys
import time
import math
sys.setrecursionlimit(20000)
def update(tree,x,y,N):
    # offset
    #x += int(N/2)
    x += N - 1
    tree[x] = y
    # segment tree no update suru
    while True:
        if(x <= 0):
            break
        x = math.floor((x - 1)/2)
        left = x*2+1
        right = x*2+2
        tree[x] = min(tree[left],tree[right])

def find(tree,x,y,k,l,r):

    if (r <= x or y <= l):
        return 2**31 - 1
    # sita wo mite itte mitukatta toki (intersect)
    if ( x <= l and r <= y):
        return tree[k]
    # sita ni sagaru
    v_left = find(tree, x, y, k*2 + 1, l, int((l+r)/2))
    v_right = find(tree, x, y, k*2 + 2, int((l+r)/2), r)
    return min(v_left, v_right)

if __name__ == '__main__':
    _N,query_num = map(int, input().split())
    INT_MAX = 2**31 - 1
    N = 1
    while True:
        if(N >= _N):
            break
        N *= 2
    #N = 2*N - 1 - 1
    if not (N == 1):
        A_bin_tree = [INT_MAX]*(2*N - 1)
    else:
        A_bin_tree = [INT_MAX]
    #start = time.time()
    for i in range(query_num):
        operate,x,y = map(int, input().split())
        # update
        if(operate==0):
            update(A_bin_tree,x,y,N)
            #print(A_bin_tree)
        # find
        if(operate==1):
            # tyouten kara miteiku
            z = find(A_bin_tree,x,y+1,0,0,N)
            print(z)
    #elapsed_time = time.time() - start
    #print ("elapsed_time:{0}".format(elapsed_time) + "[sec]")