Buggy python submission (verdict: Time Limit Exceeded):
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**9)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

x = INT()
l = [100,101,102,103,104,105]
flag = [False]

for i in l:
    if x/i==0:
        print(1)
        exit()

def dfs(cur):
    if cur==x:
        flag[0] = True
        return 0
    if cur>x:
        return 1

    if dfs(cur+100)==0:
        return 0
    if dfs(cur+101)==0:
        return 0
    if dfs(cur+102)==0:
        return 0
    if dfs(cur+103)==0:
        return 0
    if dfs(cur+104)==0:
        return 0
    if dfs(cur+105)==0:
        return 0

dfs(0)
if flag[0]:
    print(1)
else:
    print(0)

Fixed submission:
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**9)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

x = INT()

for i in range(1,10**6+1):
    if i*100<=x<=i*105:
        print(1)
        exit()
print(0)

Buggy python submission (verdict: Time Limit Exceeded):
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**9)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

x = INT()
flag = [False]

def dfs(cur):
    if cur==x:
        flag[0] = True
        return 0
    if cur>x:
        return 1
    
    if dfs(cur+100)==0:
        return 0
    if dfs(cur+101)==0:
        return 0
    if dfs(cur+102)==0:
        return 0
    if dfs(cur+103)==0:
        return 0
    if dfs(cur+104)==0:
        return 0
    if dfs(cur+105)==0:
        return 0

dfs(0)
if flag[0]:
    print(1)
else:
    print(0)

Fixed submission:
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**9)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

x = INT()

for i in range(1,10**6+1):
    if i*100<=x<=i*105:
        print(1)
        exit()
print(0)

Buggy python submission (verdict: Time Limit Exceeded):
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**9)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

x = INT()
flag = [False]

def dfs(cur):
    if cur==x:
        flag[0] = True
        return 0
    if cur>x:
        return 1
    
    if dfs(cur+100)==0:
        return 0
    if dfs(cur+101)==0:
        return 0
    if dfs(cur+102)==0:
        return 0
    if dfs(cur+103)==0:
        return 0
    if dfs(cur+104)==0:
        return 0
    if dfs(cur+105)==0:
        return 0

dfs(0)
if flag[0]:
    print(1)
else:
    print(0)

Fixed submission:
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**9)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

x = INT()

for i in range(1,10**6+1):
    if i*100<=x<=i*105:
        print(1)
        exit()
print(0)

Buggy python submission (verdict: Time Limit Exceeded):
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**6)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

x = INT()
flag = [False]

def dfs(cur):
    if cur==x:
        flag[0] = True
        return 0
    if cur>x:
        return 0
    dfs(cur+100)
    dfs(cur+101)
    dfs(cur+102)
    dfs(cur+103)
    dfs(cur+104)
    dfs(cur+105)

dfs(0)
if flag[0]:
    print(1)
else:
    print(0)

Fixed submission:
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**9)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

x = INT()

for i in range(1,10**6+1):
    if i*100<=x<=i*105:
        print(1)
        exit()
print(0)