Buggy python submission (verdict: Time Limit Exceeded):
import sys
N=int(input())

if 100<=N<=105:
    print(1)
    sys.exit()

min_=N//105
max_= N//100 + 1
#print(min_,max_)
count=0
for m in range(min_,max_):
    X = N - 100*m
    for i in range(0,X+1):
        for j in range(0,(X-i)//2 +1):
            for k in range(0,(X-i-2*j)//3 +1):
                for l in range(0,(X-i-2*j-3*k)//4 +1):
                    count+=1
                    if count >= 10**8:
                        print(0)
                        sys.exit()
                    temp = (X-i-2*j-3*k-4*l)
                    if (temp % 5 == 0) and (m-i-j-k-l-temp//5>=0):
                        a=m-i-j-k-l-temp//5
                        t=temp // 5
                        print(1)
                        #print(N,m,a,i,j,k,l,t,100*a+101*i+102*j+103*k+104*l+105*t)
                        sys.exit()
else:
    print(0)

Fixed submission:
import sys
N=int(input())

if 100<=N<=105:
    print(1)
    sys.exit()

min_=N//105
max_= N//100 + 1
#print(min_,max_)
count=0
for m in range(min_,max_):
    X = N - 100*m
    for i in range(0,X+1):
        for j in range(0,(X-i)//2 +1):
            for k in range(0,(X-i-2*j)//3 +1):
                for l in range(0,(X-i-2*j-3*k)//4 +1):
                    count+=1
                    if count >= 5*10**7:
                        print(1)
                        sys.exit()
                    temp = (X-i-2*j-3*k-4*l)
                    if (temp % 5 == 0) and (m-i-j-k-l-temp//5>=0):
                        a=m-i-j-k-l-temp//5
                        t=temp // 5
                        print(1)
                        #print(N,m,a,i,j,k,l,t,100*a+101*i+102*j+103*k+104*l+105*t)
                        sys.exit()
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
N=int(input())

if 100<=N<=105:
    print(1)
    sys.exit()

min_=N//105
max_= N//100 + 1
#print(min_,max_)
for m in range(min_,max_):
    X = N - 100*m
    for i in range(0,X+1):
        for j in range(0,(X-i)//2 +1):
            for k in range(0,(X-i-2*j)//3 +1):
                for l in range(0,(X-i-2*j-3*k)//4 +1):
                    #print(m,i,j,k,l,temp)
                    temp = (X-i-2*j-3*k-4*l)
                    if (temp % 5 == 0) and (m-i-j-k-l-temp//5>=0):
                        a=m-i-j-k-l-temp//5
                        t=temp // 5
                        print(1)
                        #print(N,m,a,i,j,k,l,t,100*a+101*i+102*j+103*k+104*l+105*t)
                        sys.exit()
else:
    print(0)

Fixed submission:
import sys
N=int(input())

if 100<=N<=105:
    print(1)
    sys.exit()

min_=N//105
max_= N//100 + 1
#print(min_,max_)
count=0
for m in range(min_,max_):
    X = N - 100*m
    for i in range(0,X+1):
        for j in range(0,(X-i)//2 +1):
            for k in range(0,(X-i-2*j)//3 +1):
                for l in range(0,(X-i-2*j-3*k)//4 +1):
                    count+=1
                    if count >= 5*10**7:
                        print(1)
                        sys.exit()
                    temp = (X-i-2*j-3*k-4*l)
                    if (temp % 5 == 0) and (m-i-j-k-l-temp//5>=0):
                        a=m-i-j-k-l-temp//5
                        t=temp // 5
                        print(1)
                        #print(N,m,a,i,j,k,l,t,100*a+101*i+102*j+103*k+104*l+105*t)
                        sys.exit()
else:
    print(0)