Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
X_MOD = X % 100
X_DIV = X // 100

import sys
sys.setrecursionlimit(2000)
def dfs(sum_x, cnt_x):
    if cnt_x > X_DIV:
        return False
    if sum_x == X_MOD:
        return True

    
    return dfs(sum_x+1, cnt_x+1) or dfs(sum_x+1, cnt_x+2) or dfs(sum_x+3, cnt_x+1) or dfs(sum_x+4, cnt_x+1) or dfs(sum_x+5, cnt_x+1)
    

ans = int(dfs(0,0))
print(ans)

Fixed submission:
X = int(input())
X_MOD = X % 100
X_DIV = X // 100

import sys
sys.setrecursionlimit(2000)
def dfs(sum_x, cnt_x, num):
    if cnt_x > X_DIV:
        return False
    if sum_x == X_MOD:
        return True

    if num == 1:
        return dfs(sum_x+1, cnt_x+1, 1) or dfs(sum_x+1, cnt_x+2, 2) or dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 2:
        return dfs(sum_x+1, cnt_x+2, 2) or dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 3:
        return dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 4:
        return dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 5:
        return dfs(sum_x+5, cnt_x+1, 5)
    

ans = int(dfs(0,0,1))
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())
X_MOD = X % 100
X_DIV = X // 100
def bfs():
    
    from collections import deque
    queue = deque([(0, 0)])
    while queue:
        sum_x, cnt_x = queue.popleft()
        #print(sum_x, cnt_x)
        if sum_x == X_MOD:
            return 1
        if sum_x > X_MOD:
            continue
        if cnt_x == X_DIV:
            continue

        queue.append((sum_x + 1,cnt_x+1))
        queue.append((sum_x + 2,cnt_x+1))
        queue.append((sum_x + 3,cnt_x+1))
        queue.append((sum_x + 4,cnt_x+1))
        queue.append((sum_x + 5,cnt_x+1))
    return 0

ans = bfs()
print(ans)

Fixed submission:
X = int(input())
X_MOD = X % 100
X_DIV = X // 100

import sys
sys.setrecursionlimit(2000)
def dfs(sum_x, cnt_x, num):
    if cnt_x > X_DIV:
        return False
    if sum_x == X_MOD:
        return True

    if num == 1:
        return dfs(sum_x+1, cnt_x+1, 1) or dfs(sum_x+1, cnt_x+2, 2) or dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 2:
        return dfs(sum_x+1, cnt_x+2, 2) or dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 3:
        return dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 4:
        return dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 5:
        return dfs(sum_x+5, cnt_x+1, 5)
    

ans = int(dfs(0,0,1))
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())

def bfs():
    from collections import deque
    queue = deque([0])
    while queue:
        sum_x = queue.popleft()
        if sum_x == X:
            return 1
        if sum_x > X:
            continue

        queue.append(sum_x + 100)
        queue.append(sum_x + 101)
        queue.append(sum_x + 102)
        queue.append(sum_x + 103)
        queue.append(sum_x + 104)
        queue.append(sum_x + 105)
    return 0

ans = bfs()
print(ans)

Fixed submission:
X = int(input())
X_MOD = X % 100
X_DIV = X // 100

import sys
sys.setrecursionlimit(2000)
def dfs(sum_x, cnt_x, num):
    if cnt_x > X_DIV:
        return False
    if sum_x == X_MOD:
        return True

    if num == 1:
        return dfs(sum_x+1, cnt_x+1, 1) or dfs(sum_x+1, cnt_x+2, 2) or dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 2:
        return dfs(sum_x+1, cnt_x+2, 2) or dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 3:
        return dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 4:
        return dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 5:
        return dfs(sum_x+5, cnt_x+1, 5)
    

ans = int(dfs(0,0,1))
print(ans)