Problem:
 Score: 300 points    Problem Statement  AtCoder Mart sells 1000000 of each of the six items below:   Riceballs, priced at 100 yen (the currency of Japan) each  Sandwiches, priced at 101 yen each  Cookies, priced at 102 yen each  Cakes, priced at 103 yen each  Candies, priced at 104 yen each  Computers, priced at 105 yen each   Takahashi wants to buy some of them that cost exactly X yen in total.
Determine whether this is possible. (Ignore consumption tax.)      Constraints   1 \leq X \leq 100000  X is an integer.         Input  Input is given from Standard Input in the following format:  X       Output  If it is possible to buy some set of items that cost exactly X yen in total, print 1 ; otherwise, print 0 .        Sample Input 1 615      Sample Output 1 1  For example, we can buy one of each kind of item, which will cost 100+101+102+103+104+105=615 yen in total.       Sample Input 2 217      Sample Output 2 0  No set of items costs 217 yen in total.

Solution (Python):
import numpy as np

X = int(input())

dp = np.zeros(X + 1)

if X >= 105:
    dp[100] = dp[101] = dp[102] = dp[103] = dp[104] = dp[105] = 1
elif X >= 104:
    dp[100] = dp[101] = dp[102] = dp[103] = dp[104] = 1
elif X >= 103:
    dp[100] = dp[101] = dp[102] = dp[103] = 1
elif X >= 102:
    dp[100] = dp[101] = dp[102] = 1
elif X >= 101:
    dp[100] = dp[101] = 1
elif X >= 100:
    dp[100] = 1


for i in range(106, X+1):
    if dp[i-100] or dp[i-101] or dp[i-102] or dp[i-103] or dp[i-104] or dp[i-105]:
        dp[i] = 1

print(int(dp[X]))

Solution (Python):
x = int(input())
n = x // 100
r = x % 100

print('1' if r <= 5 * n else '0')

Solution (Python):
import math
X=int(input())

N=int(math.ceil(X/105))
dekiruka=0
while N <= X/100:
    if X-100*N <= 5*N:
        dekiruka=1
        break
    N=N+1

if dekiruka==1:
    print(1)
else:
    print(0)

Solution (Python):
import sys
x = input()
x1 = list(x)
h = len(x)
x = int(x)

if x>2000:
  print('1')
  sys.exit()

a1 = int(x1[h-1])
a2 = int(x1[h-2])

if 0 < a1 <= 5:
  c1 = 1
elif a1 == 0:
  c1 = 0
else:
  c1 = 2

c2 = a2*2

if h>3:
  if 10*int(x1[0])+int(x1[1]) < c1+c2:
    print('0')
  else:
    print('1')
else:
  if int(x1[0]) < c1+c2:
    print('0')
  else:
    print('1')

Solution (Python):
x=int(input())

num = x//100
div = x%100
ans=0

if  0<=div<=(num*5):
    ans=1

print(ans)

Solution (Python):
X = int(input())

if(0 <= X%100 <= 5*(X//100)):
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
dX = X // 100
sX = X - 100*dX
if sX <= dX*5:
    print(1)
else:
    print(0)

Solution (Python):
import sys
X = int(input())

for i in range(1000):
    if X >= 100*i and X <= 105*i:
        print(1)
        sys.exit()
print(0)

Solution (Python):
x=int(input())
a=x//100
b=x%100
if -(-b//5)>a:
  print(0)
else:
  print(1)

Solution (Python):

X = int(input())
head = X//100
tail = X%100
if tail >head*5:
    print(0)
else :
    print(1)

Solution (Python):
x = int(input())
if x//100*105 >= x:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
for i in range(1,100000):
    if 100*i<=x<=105*i:
        print(1)
        exit()
print(0)

Solution (Python):
x = int(input())
c = x//100
print(int(100*c <= x <= 105*c))

Solution (Python):
x=int(input())
print(1 if x//100*105>=x else 0)

Solution (Python):
X = int(input())
print(1 if X > 2000 or (X//100)*100 <= X <= (X//100)*105 else 0)

Solution (Python):
x = int(input())

num_min = x//105
num_max = x//100

for i in range(num_min, num_max+1):
    if x - 100*i <= 5*i:
        print(1)
        exit()
        
print(0)

Solution (Python):
x = int(input())

possible = [0] * (x+1) 
possible[0] = 1

for k in range(x+1):
    for i in range(100, 106):
        if k-i >= 0 and possible[k-i]:
            possible[k] = 1

print(possible[x])

Solution (Python):
x=int(input())
if x>=2000:
    print(1)
else:
    if (x//100)*100<=x<=(x//100)*105:
        print(1)
    else:
        print(0)

Solution (Python):
x = int(input())
key = [False]*(pow(10, 5)+1)
for i in range(1, 1000):
  for j in range(100*i, 105*i+1):
    if j <= pow(10, 5):
      key[j] = True
print(1 if key[x] else 0)

Solution (Python):


from collections import deque,Counter













X = int(input())

dp = {100:1,101:1,102:1,103:1,104:1,105:1}
lis = [100,101,102,103,104,105]
que = deque([100,101,102,103,104,105])
while len(que)>0:
    num = que.popleft()
    for i in lis:
        dp[num+i] = 1
        if num+i <= 100000 and not(num+i in que):
            que.append(num + i)

if X in dp:
    ans = 1
else:
    ans = 0

print(ans)

Solution (Python):
n = int(input())
amari = n % 100
many = n // 100
if 0 <= amari <= many * 5:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
dp = [0] * (X + 1000)
dp[0] = 1
array = [100, 101, 102, 103, 104, 105]

for x in range(X):
    for y in array:
        if dp[x] == 1:
            dp[x + y] = 1
print(dp[X])

Solution (Python):

import sys

def main():
    X = int(input())

    for i in range(X//100 + 1):
        if X - 100*i <= 5*i:
            print(1)
            exit()
    print(0)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





n=ii()

a=n//100

if a*100<= n <=a*105:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
for i in range(-(~x//100)):
    if i*100 <= x <= i*105:
        print(1)
        break
else:
    print(0)

Solution (Python):
x = int(input())

flag = False
for c in range(1,x+1):
  if c * 100 <= x and x <= c * 105:
    flag = True
    break
print(1 if flag else 0)

Solution (Python):
x = int(input())
num = x // 100
amr = x % 100
if num*5 < amr:
  ans = 0
else:
  ans = 1
print(ans)

Solution (Python):
x = int(input())

p, q = divmod(x, 100)

ans = 0
if p * 5 >= q:
    ans = 1

print(ans)

Solution (Python):
X = int(input())

count = X // 100
amari = X % 100

if amari <= count * 5:
    print(1)
else:
    print(0)

Solution (Python):
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt, ceil
from functools import lru_cache, reduce
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def dijkstra_heap(s, edge, n):
    
    d = [10**20] * n
    used = [True] * n 
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def lcm(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


def gcd_list(numbers):
    return reduce(gcd, numbers)


def is_prime(n):
    if n <= 1:
        return False
    p = 2
    while True:
        if p ** 2 > n:
            break
        if n % p == 0:
            return False
        p += 1
    return True



def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P


def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret



def main(x):
    dp = [0] * x
    for i in range(x):
        if i + 1 in [100, 101, 102, 103, 104, 105]:
            dp[i] = 1
            continue
        if 0 <= i - 105:
            dp[i] = max(dp[i], dp[i - 105])
        if 0 <= i - 104:
            dp[i] = max(dp[i], dp[i - 104])
        if 0 <= i - 103:
            dp[i] = max(dp[i], dp[i - 103])
        if 0 <= i - 102:
            dp[i] = max(dp[i], dp[i - 102])
        if 0 <= i - 101:
            dp[i] = max(dp[i], dp[i - 101])
        if 0 <= i - 100:
            dp[i] = max(dp[i], dp[i - 100])
    return dp[x - 1]


x = int(input())
print(main(x))

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    for i in range(1001):
        if 100*i<=n and n<=105*i:
            print(1)
            break
    else:print(0)


if __name__=='__main__':
    main()

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    for i in range(1001):
        if 100*i<=n and n<=105*i:
            print(1)
            break
    else:print(0)


if __name__=='__main__':
    main()

Solution (Python):
dp = {100: 1, 101: 1, 102: 1, 103: 1, 104: 1, 105: 1}
l = [100, 101, 102, 103, 104, 105]
for i in range(100001):
  if i == 0:
    dp[0] = 1
  elif i < 100:
    dp[i] = 0
  elif i >= 106:
    dp[i] = 0
    for cost in l:
      dp[i] += dp[i-cost]

n = int(input())
if dp[n] >= 1:
  print(1)
else:
  print(0)

Solution (Python):
x = int(input())

dp = [0 for _ in range(100000 + 1)] 
dp[0] = 1
for i in range(100, 106):
    dp[i] = 1
for i in range(106, x + 1):
    
    if sum(dp[i-105:i-99]) >= 1:
        dp[i] = 1
print(dp[x])

Solution (Python):
x = int(input())

dp = [0 for _ in range(100000 + 1)] 
dp[0] = 1
for i in range(100, 106):
    dp[i] = 1
for i in range(106, x + 1):
    if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
        dp[i] = 1
print(dp[x])

Solution (Python):
x = int(input())

dp = [0 for _ in range(x + 1)] 
dp[0] = 1
if x < 100:
    print(dp[x])
    exit()
for i in range(100, min(x+1,106)):
    dp[i] = 1
if x < 106:
    print(dp[x])
    exit()
for i in range(106, x + 1):
    if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
        dp[i] = 1
print(dp[x])

Solution (Python):
N = int(input())
dp = [0]*(N+1)
dp[0] = 1

for i in range(N+1):
  if dp[i]:
    for j in range(100, 105+1):
      if i+j <= N:
        dp[i+j] = 1

print(dp[N])

Solution (Python):

x = int(input())

tmp1 = (x % 100) // 5
tmp2 = ((x % 100) - tmp1 * 5) // 4
tmp3 = ((x % 100) - tmp1 * 5 - tmp2 * 4) // 3
tmp4 = ((x % 100) - tmp1 * 5 - tmp2 * 4 - tmp3 * 3) // 2
tmp5 = (x % 100) - tmp1 * 5 - tmp2 * 4 - tmp3 * 3 - tmp4 * 2
if x // 100 >= tmp1 + tmp2 + tmp3 + tmp4 + tmp5:
    print(1)
else:
    print(0)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
debugmode = True

x = INT()
m = x % 100
num = x // 100
if num * 5 < m:
    print(0)
else:
    print(1)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

    def main():
        X=int(input())
        N=-(-X//100)

        for i in range(1,N+1):
            if 100*i<=X<=105*i:
                return 1
        return 0
    print(main())

resolve()

Solution (Python):
import itertools
def modelAnswer(X:int):
   lis = [i for i in range(100,106)]
   C = X//100
   for p in itertools.combinations_with_replacement(lis,C):
      if(sum(p)==X):
         return 1
   return 0

def main():
   X = int(input())
   print(modelAnswer(X))

if __name__ == '__main__':
   main()

Solution (Python):
def myAnswer(X:int)-> int:
   
   if(X < 100) : return 0

   total = 0 
   first = X % 10 
   secand = ((X // 10) % 10) *10 
   if(first <=5 and first >=1): 
      total += 100 + first
   elif(first >= 6):
      total += 200 + first 

   total += (secand//5)*105 
   
   return 1 if(total <= X) else 0



def modelAnswer():
   tmp=1
def main():
   X = int(input())
   print(myAnswer(X))

if __name__ == '__main__':
   main()

Solution (Python):
X=int(input())
A=X%100
B1=A//5
B2=A%5
C1=B2//4
C2=B2%4
D1=C2//3
D2=C2%3
E=D2//2
F=D2%2
ans=105*B1+104*C1+103*D1+102*E+101*F
if ans<=X:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
if x-x//100*100<=100-5*(20-x//100):
    print("1")
else:
    print("0")

Solution (Python):
from heapq import *
import sys
from collections import *

from itertools import *
from decimal import *
import copy
from bisect import *
import time

import math

def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))
sys.setrecursionlimit(10**7)
input=lambda :sys.stdin.readline().rstrip()
X=int(input())
dp=[0]*(X+1)
dp[0]=1
for a in [100,101,102,103,104,105]:
    for i in range(len(dp)):
        if i-a>=0:
            if dp[i-a]==1:
                dp[i]=1
print(dp[-1])

Solution (Python):
import math
X=int(input())
under = math.floor(X / 105)
top = math.floor(X/100)

if X / 105==under or X/100==top or  top - under > 0:

    print("1")
else:
    print("0")

Solution (Python):
x = int(input())
dp = [False] * (x + 1)
dp[0] = True
for i in range(x+1):
  if i >= 100:
    dp[i] |= dp[i-100]
    dp[i] |= dp[i-101]
    dp[i] |= dp[i-102]
    dp[i] |= dp[i-103]
    dp[i] |= dp[i-104]
    dp[i] |= dp[i-105]
print(dp[x]+0)

Solution (Python):
X = int(input())

r = X % 100

b = r // 5
r -= 5 * b

c = r // 4
r -= 4 * c

d = r // 3
r -= 3 * d

e = r // 2
r -= 2 * e

f = r // 1
r -= 1 * f

if 105 * b + 104 * c + 103 * d + 102 * e + 101 * f > X:
    print(0)
else:
    print(1)

Solution (Python):
X = int(input())
flag = 0
for C in range(X+1):
  if 100*C <= X and 105*C >= X:
    flag += 1
    break
print(flag)

Solution (Python):
x = int(input())

if x >= 2000:
    print(1) 
elif x >= 100:
    print(1 if x % 100 <= x // 100 * 5 else 0)
else:
    print(0)

Solution (Python):
X = int(input())

err = 0
while X >= 0:
    X -= 100
    err += 5
    
    if 0 <= X <= err:
        print('1')
        break
else:
    print('0')

Solution (Python):
x = int(input())
a = x%100
n = x//100

if x <= 105*n:
    print("1")
else:
    print("0")

Solution (Python):
X = int(input())

c = X // 100
d = X - 100 * c

for _ in range(c):
    if (d == 0):
        break
    elif (d >= 5):
        d -= 5
    else:
        d -= d

if (d == 0):
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
dp = [0]*10**6
dp[0] = 1
for i in range(10**5+1000):
    if dp[i] == 1:
        for j in range(100, 106):
            dp[i+j] = 1
print(dp[x])

Solution (Python):
x = int(input())
flag = False

for i in range(1,2000):
    if i * 100 <= x <= i * 105:
        flag = True
        break

if flag:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
MIN = 100
MAX = 105
for k in range(1, 1001):
  if k * MIN <= x <= k * MAX:
    print(1)
    break
else:
  print(0)

Solution (Python):
x = int(input())
a = x%100
n = x//100

if a <= 5*n:
    print("1")
else:
    print("0")

Solution (Python):
from math import  *

input = int(input())

def getMoney(money):
    prices = [100, 101, 102, 103, 104, 105]
    rem = []
    for element in prices:
        rem.append(money - money * floor(money/element))
    bounds = [floor(money/element) + 1 for element in prices]
    for index1 in range(bounds[0]):
        for index2 in range(bounds[1]):
            for index3 in range(bounds[2]):
                for index4 in range(bounds[3]):
                    for index5 in range(bounds[4]):
                        for index6 in range(bounds[5]):
                            if (index1 * prices[0] + index2 * prices[1] +index3 * prices[2] + index4 * prices[3] + index5 * prices[4] + index6 * prices[5] == money):
                                return 1
    return 0

def getmoneyFast(money):
    prices = [105, 104, 103, 102, 101, 100]
    initialBounds = [floor(money/element) + 1 for element in prices]
    for index1 in range(initialBounds[0]):
        nmoney = money - index1 * prices[0]
        for index2 in range(getNewBound(nmoney,1)):
            nmoney = money - index1 * prices[0] - index2*prices[1]
            for index3 in range(getNewBound(nmoney, 2)):
                nmoney = money - index1 * prices[0] - index2*prices[1] - index3 * prices[2]
                for index4 in range(getNewBound(nmoney, 3)):
                    nmoney = money - index1 * prices[0] - index2*prices[1] - index3 * prices[2] - index4 * prices[3]
                    for index5 in range(getNewBound(nmoney, 4)):
                        nmoney = money - index1 * prices[0] - index2*prices[1] - index3 * prices[2] - index4 * prices[3] - index5 * prices[4]
                        index6 = ((money - (index1 * prices[0] + index2 * prices[1] + index3 * prices[2] + index4 * prices[3] + index5 * prices[4]))/prices[5])
                        if (index6.is_integer()):
                            if (money - index1 * prices[0] - index2*prices[1] - index3 * prices[2] - index4 * prices[3] - index5 * prices[4] - index6*prices[5] == 0):
                                return 1
    return 0



def getNewBound(nmoney, index):
    prices = [105, 104, 103, 102, 101, 100]
    return floor(nmoney/prices[index])+1


print(getmoneyFast(input))

Solution (Python):
x = int(input())
mod = x%100

minbuy = 0
for i in range(1,6)[::-1]:
    minbuy += mod // i
    mod = mod % i
print(0 if minbuy*100 > x else 1)

Solution (Python):
X = int(input())
a = X % 100
n = X // 100 
print(1 if a <= 5 * n else 0)

Solution (Python):
X = int(input())
dp = [0] * (X+1000)
for i in range(6):
    dp[100+i] = 1
for i in range(X+10):
    for k in range(6):
        if i - 100 - k > 0:
            dp[i] = dp[i] | dp[i-100-k]
print(dp[X])

Solution (Python):
d={}
def s(x):
  if 100<=x<=105 or x>=2000:
    return True
  if x<100:
    return False
  if x not in d:
    d[x]=any(s(x-i) for i in range(100,106))
  return d[x]

x=int(input())
print(int(s(x)))

Solution (Python):
X = int(input())
n = X // 100
X = X - n * 100
ans= 1
while n > 0:
    if X >= 5:
        X = X - 5
    elif X >= 4:
        X = X - 4
    elif X >= 3:
        X = X - 3
    elif X >= 2:
        X = X - 2
    elif X >= 1:
        X = X - 1
    elif X == 0:
        break
    n -= 1
if X > 0:
    ans = 0
print(ans)

Solution (Python):
x = int(input())
 
for i in range(2000):
    if i * 100 <= x <= i * 105:
        print(1)
        exit()
 
print(0)

Solution (Python):
n = int(input())
h = n//100
if 100*h <= n <= 105*h:
  print(1)
else:
  print(0)

Solution (Python):
x = int(input())
if x < 100:
    print(0)
    exit()
a, b = divmod(x, 100)
if a * 5 >= b:
    print(1)
else:
    print(0)

Solution (Python):

X = int(input())



i = 0
dp = [0]*(X+1)
dp[0] = 1
for i in range(100, X+1):
    for j in range(6):
        if dp[i-(100+j)] == 0:
            pass
        else:
            dp[i] = 1
print(dp[X])

Solution (Python):
import sys
X = int(input())
if 1 <= X and X < 100:
    print("0")
    sys.exit()
i = 0
dp = [0]*(X+1)
dp[0] = 1
for i in range(100, X+1):
    for j in range(6):
        if dp[i-(100+j)] == 0:
            pass
        else:
            dp[i] = 1
print(dp[X])

Solution (Python):
X = int(input())








flag = False

if(X >= 2000):
    flag = True

for i in range(1, 20):
    if(i*100 <= X and X <= i*105):
        flag = True
        break

if(flag):
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
DP = [[0]*(X+1) for i in range(6)]
A = [100+i for i in range(6)]
DP[0][0] = 1
for i in range(6):
    for x in range(X+1):
        if i==0:
            if x>=100:
                DP[i][x] = DP[i][x-100]
        else:
            a = A[i]
            DP[i][x] = DP[i-1][x]
            if x>=a:
                DP[i][x] = max(DP[i][x],DP[i][x-a])
print(DP[5][X])

Solution (Python):
def I(): return int(input())

X = I()
dp = [0]*(X+1)    
dp[0] = 1
for i in range(X+1):
    if dp[i]:
        for j in range(100,106):
            if i+j<=X:    
                dp[i+j] = 1
print(dp[-1])

Solution (Python):
x = int(input())
a,b = divmod(x,100)
if a*5>=b:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
k = 0
x = X%100
while x!=0:
    k+=1
    for i in range(5,0,-1):
        if i<=x:
            x-=i
            break
X //= 100
print(1 if k<=X else 0)

Solution (Python):
X=int(input())
for i in range(1,X+1):
    if (100*i)<=X and X<=(105*i):
        print(1)
        exit()
print(0)

Solution (Python):
X = int(input())
for i in range(X//100 + 1):
    if i*100 <= X and X <= i*105:
        print(1)
        exit()
print(0)

Solution (Python):
n = int(input())

cent = n//100
under_cent = n%100

if under_cent > cent*5:
  print(0)
else:
  print(1)

Solution (Python):
X = int(input())
x = X//100
if x*5 < X%100:
    print(0)
else:
    print(1)

Solution (Python):
X = int(input())
dp = [0 for i in range(100001)]
for i in range(100, 106):
    dp[i] = 1

for i in range(len(dp)):
    if dp[i] == 1:
        for j in range(100, 106):
            if i + j <= 100000:
                dp[i + j] = 1

print(dp[X])

Solution (Python):
X = int(input())
if X >2000:
  print("1")
else:
  flag = False
  for i in range(1,20,1):
    if not (X in range(100*i,105*i +1)) == False:
      print("1")
      flag = True
      break
  if flag ==False:
    print("0")

Solution (Python):
X = int(input())
N = X//100
if X <= N*105:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
if X >= 2000:
    print(1)
else:
    N = X//100
    if X <= N*105:
        print(1)
    else:
        print(0)

Solution (Python):
x = int(input())

h = x // 100
r = x % 100

if r <= h*5:
    print(1)
else:
    print(0)

Solution (Python):
X=int(input())
dp=[0]*(X+1)
dp[0]=1
A=[100,101,102,103,104,105]
for i in range(X+1):
    for k in A:
        if i-k>=0 and dp[i-k]:
            dp[i]=1
print(dp[X])

Solution (Python):
X=int(input())
dp=[0]*(X+106)
dp[0]=1
for i in range(X):
    if dp[i]==1:
        for j in range(100,106):
            dp[i+j]=1
print(dp[X])

Solution (Python):
X=int(input())
d,m=divmod(X,100)
print(1 if m<=(d*5) else 0)

Solution (Python):


import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

x = ni()

a = x % 100
b = x // 100
if b * 5 >= a:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
flag=False
for i in range(1,x+1):
    if i*100<=x and x<=105*i:
        flag=True
        break
if flag:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())

n = X // 100
rest = X - n * 100

if n * 5 >= rest:
    print("1")
else:
    print("0")

Solution (Python):
X = int(input())

dp = [0] * (X + 105 + 1)
dp[0] = 1

for i in range(X):
    if dp[i] == 1:
        for c in [100, 101, 102, 103, 104, 105]:
            dp[i+c] = 1

print(dp[X])

Solution (Python):
x = int(input())
for c in range(x+1):
  l = 100*c
  r = 105*c
  if l <= x <= r:
    print(1)
    exit()
else:
  print(0)

Solution (Python):
X = int(input())
for i in range(1000):
    if 100*i <= X and X <= 105*i:
        print(1)
        break
else:
    print(0)

Solution (Python):
X = int(input())
C, M = divmod(X, 100)

if 100 * C <= X <= 105 * C:
    print(1)
else:
    print(0)

Solution (Python):
N = int(input())
x = N//100
y = N%100
if x == 0:
  print(0)
  exit()
if y/x > 5:
  print(0)
else:
  print(1)

Solution (Python):
import sys
x = int(input())

for i in range(1, 1001):
    for j in range(15001):
        if 100 * i + j == x and j <= 5 * i:
            print("1")
            sys.exit()

print("0")

Solution (Python):
X = int(input())
d = X //100
if d >=20:
    print(1)
    exit()
k = X % 100
if 5 * d >= k:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())

n=x//100
if (n*100<=x<=n*105):
    print(1)
else:
    print(0)

Solution (Python):
m1 = int(input())

div = m1//100
res = m1-div*100

if res<=div*5:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
DP=[0]*(X+1)

def dp(n):
  if n<100:
    return 0
  if 100<=n and n<=105:
    return 1
  res = 0
  for i in range(100,106):
    res |= DP[n-i]
  return res

for i in range(X+1):
  DP[i] = dp(i)
ans=DP[X]

print(ans)

Solution (Python):
cost = int(input())
shou,amari = divmod(cost,100)
if shou*5 >= amari:
  print("1")
else:
  print("0")

Solution (Python):
def solve(X):
    for a in range(1 + X // 100):
        for b in range(1 + X // 101):
            for c in range(1+ X // 102):
                for d in range(1 + X // 103):
                    for e in range(1 + X // 104):
                        for f in range( 1 + X // 105):
                            if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 == X:
                                return 1
                            elif a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
                                break
                
                 
              
               
            
             
          
           
        
         
    return 0

X = int(input())
print(solve(X))

Solution (Python):
X = int(input())

q, r = X//100, X%100
if r <= 5 * q:
    print(1)
else:
    print(0)

Solution (Python):
X=int(input())
A=0
B=X
while B>=100:
    B-=100
    A+=1
while B>=5:
    B-=5
    A-=1
while B>=4:
    B-=4
    A-=1
while B>=3:
    B-=3
    A-=1
while B>=2:
    B-=2
    A-=1
while B>=1:
    B-=1
    A-=1
if A>=0:
    print(1)
else:
    print(0)

Solution (Python):
X=int(input())

N=X//100
P=X-100*N
if P<=5*N:
  print(1)
else:
  print(0)

Solution (Python):
n = int(input())
d, m = divmod(n, 100)
if m <= d*5:
    print(1)
else:
    print(0)

Solution (Python):
def main():
    x = int(input())

    tmp = x // 100

    x = x - tmp * 100

    if x <= tmp * 5:
        print('1')
    else:
        print('0')

if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())
ans = 0

for i in range(1000):
    if 100*i <= X <= 105*i:
        ans += 1
    else:
        ans += 0

if ans==0:
    print(0)
else:
    print(1)

Solution (Python):



import sys
sys.setrecursionlimit(10000000)



def pin(type=int):
    return map(type,input().rstrip().split())

def resolve():
    N,=pin()
    n,t=N//100,N%100
    if n*5>=t:
        print(1)
        return
    print(0)
"""


"""
"""
お前カッコ閉じるの忘れてるだろ
"""
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """615"""
        output = """1"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """217"""
        output = """0"""
        self.assertIO(input, output)
if __name__=="__main__":resolve()

Solution (Python):
import math
n = int(input())
tmp = math.ceil(n/105)
if n >= tmp * 100 and n <= tmp * 105:
  print(1)
else:
  print(0)

Solution (Python):
n=int(input())
print("1" if n<=n//100*105 else "0")

Solution (Python):
def main():
    target = int(input())
    answer = False
    for i in range(1, 1001):
        if i * 100 <= target <= i * 105:
            answer = True
            break
    print(1 if answer else 0)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())

x = n//100
m = n%100

if 5*x<m:
    print(0)
else:
    print(1)

Solution (Python):
x = int(input())

if x >= 100 * 100 / (105 - 100):
    print(1)
    exit()

for i in range(20):
    if 100 * i <= x and x <= 105 * i:
        print(1)
        exit()

print(0)

Solution (Python):
x = int(input())
for i in range(100000):
    if(100*i <= x and 105*i >= x):
        print(1)
        exit()
else:
    print(0)