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):
X=int(input())
if X >=2100:
  print(1)
else:
  X_100=X//100
  if X-(X_100*100)>X_100*5:
    print(0)
  else:
    print(1)

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

MAX_NUM = 1000000

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

Solution (Python):




x=int(input())

dp=[0]*(x+1)
c=[100,
   101,
   102,
   103,
   104,
   105]

dp[0]=1
for i in range(len(c)):
    for j in range(1,x+1):
        if c[i]>j:continue
        if dp[j-c[i]]:dp[j]=1
print(1 if dp[-1] else 0)

Solution (Python):
import math


def inputIntList():
    return [int(s) for s in input().split()]


def inputInt():
    return int(input())


inf = float("inf")


def main():
    total = inputInt()

    dp = [0 for _ in range(total + 1)]

    for i in range(100, total + 1):
        for j in range(100, 106):
            if dp[i] < i:
                dp[i] = dp[i - j] + j
    return 1 if dp[total] == total else 0


if __name__ == "__main__":
    print(main())

Solution (Python):
def solve(x):
    dp = [False] * (x+110)
    dp[0] = True
    for i in range(x+1):
        if dp[i]:
            for j in range(100, 106):
                dp[i+j] = True
    return int(dp[x])

x = int(input())
print(solve(x))

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

num = x / 100

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

for i in range(1, x + 1):
    if i <= 99:
        dp[i] = 0
    elif i in (100, 101, 102, 103, 104, 105):
        dp[i] = 1
    elif 1 in (dp[i - 100], dp[i - 101], dp[i - 102], dp[i - 103], dp[i - 104], dp[i - 105]):
        dp[i] = 1
    else:
        dp[i] = 0

print dp[x]

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

num = x / 100

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

for i in range(1, x + 1):
    if i <= 99:
        dp[i] = 0
    elif i in (100, 101, 102, 103, 104, 105):
        dp[i] = 1
    else:
        if 1 in (dp[i - 100], dp[i - 101], dp[i - 102], dp[i - 103], dp[i - 104], dp[i - 105]):
            dp[i] = 1
        else:
            dp[i] = 0

print dp[x]

Solution (Python):
X=int(input())
Y=(X-1)/1.05
A=X//100
B=Y//100
if A==B:
  print(0)
else:
  print(1)

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

num = x // 100



dp = ["?"] * (x+1)
dp[0] = "1"

for i in range(1,x+1):
    if i <= 99:
        dp[i] = "0"
    elif i in (100,101,102,103,104,105):
        dp[i] = "1"
    else:
        if "1" in(dp[i-100],dp[i-101],dp[i-102],dp[i-103],dp[i-104],dp[i-105]):
            dp[i] = "1"
        else:
            dp[i] = "0"

            
print(dp[x])

Solution (Python):

x = input()

if int(x) < 100:
    print(0)
elif 5 * int(x[0:-2]) >= int(x[-2:]):
    print(1)
else:
    print(0)

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

a = int(x/100)
b = x % 100

if b > a*5:
    print(0)
else:
    print(1)

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

if X >= 2000:
    print(1)

else:
    num = X // 100
    res = 0

    for a in range(num+1):
        for b in range(num-a+1):
            for c in range(num-(a+b)+1):
                for d in range(num-(a+b+c)+1):
                    for e in range(num-(a+b+c+d)+1):
                        for f in range(num-(a+b+c+d+e)+1):
                            if a*100 + b*101 + c*102 + d*103 + e*104 + f*105 == X:
                                res = 1
                                break

    print(res)

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

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


num = math.ceil(x/105)
remain = num * 105 - x

can = False
if remain < num * 5:
  can = True
else:
  
  num = math.floor(x/100)
  remain = x - num * 100

  if remain < num * 5:
    can = True

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

Solution (Python):
import itertools

x = int(input())
my_iter = itertools.combinations_with_replacement([0,1,2,3,4,5], int(x/100))
for p in my_iter:
    s = sum(p)
    if sum(p) % 100 == x % 100:
        z_c = len(list(filter(lambda x:x == 0, p)))
        if z_c >= int(sum(p) / 100):
            print(1)
            break
else:
    print(0)

Solution (Python):



import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

x = I()
y,z = divmod(x,100)
if y*5 >= z:
    print(1)
else:
    print(0)

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

A100 = 0
A105 = 0
for i in range(1001):
    A100 += 100
    A105 += 105
    if A100 <= X <= A105:
        print("1")
        exit()

print("0")

Solution (Python):
X =int(input())
if X > 2000:
    print(1)
    quit()
lst = []
for i in range(20):
    lst.append([i * 105 + 1, i * 100 + 99])
for item in lst:
    if X >= item[0] and X <= item[1]:
        print(0)
        quit()
print(1)

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


X = int(sys.stdin.buffer.readline())
l = 0
h = 0
while l <= X:
    l += 100
    h += 105
    if l <= X <= h:
        print(1)
        exit()
print(0)

Solution (Python):
x=int(input())
print(int((x-1)//105!=x//100))

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

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

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

Solution (Python):



X=int(input())
a=X%100
b=X//100
c=a%5
d=a//5
e=c%4
f=c//4
g=e%3
h=e//3
i=g%2
j=g//2
if b>=(d+f+h+j+(X-100*b-5*d-4*f-3*h-2*j)):
    print("1")
else:
    print("0")

Solution (Python):
XMAX = 10**5
X = int(input())
dp = [False] * (XMAX + 1)
dp[0] = True

for i in range(0, X + 1):
    for p in range(100, 106):
        if i - p >= 0 and dp[i - p]:
            dp[i] = True
            next
if dp[X]:
    print(1)
else:
    print(0)

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

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

if X >= 100:
    if X % 100 == 0:
        print(1)
        exit()
elif 0 <= X <= 99:
    print(0)
    exit()

a = X // 105
b = a * 105 + 1
c = str(a) + '9' * 2
c = int(c)

if b <= X <= c:
    print(0)
else:
    print(1)

Solution (Python):
X =int(input())
if X > 10100:
    print(1)
    quit()
lst = []
for i in range(20):
    lst.append([i*105+1, i*100+99])
for item in lst:
    if X >= item[0] and X<=item[1]:
        print(0)
        quit()
print(1)

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())

if X >= 2000:
    print(1)
else:
    for n in range(1, 20):
        if 100 * n <= X <= 105 * n:
            print(1)
            break
    else:
        print(0)

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

dp = [0 for _ in range(X+1)]
dp[0] = 1

for i in range(X):
    if dp[i] == 1:
        for v in range(100, 105 + 1):
            if i+v <= X:
                dp[i+v] = 1
print(dp[X])

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

Solution (Python):
x = int(input())
count = x//100
res = x%100
if count*5 >= res:
    print(1)
else:
    print(0)

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

num_of_product = x // 100
amari = x % 100

if num_of_product * 5 < amari:
	print("0")
else:
	print("1")

Solution (Python):
X = int(input())
dp = [1]+[0]*X
for i in range(X):
  if i+1 < 100: dp[i+1] = 0
  elif i+1 <=105: dp[i+1] = 1
  elif sum([dp[i+1-(100+j)] for j in range(6)])>0: dp[i+1] = 1
  else: dp[i+1] = 0
print(dp[-1])

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

d100 = X // 100
if 100 * d100 <= X <= 105 * d100: print('1')
else: print('0')

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

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

    if x<100:
        print(0)
        return
    elif x<106:
        print(1)
        return

    dp = [False for _ in range(x+1)]
    for i in range(6):
        dp[100+i] = True

    
    for i in range(106, x+1):
        for j in range(6):
            if dp[i-100-j]:
                dp[i] = True
                break

    if dp[i]:
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())
v = X % 100

f = v // 5
v -= f * 5

e = v // 4
v -= e * 4

d = v // 3
v -= d * 3

c = v // 2
v -= d * 2

b = v // 1
v -= b

a = (X - (101 * b + 102 * c + 103 * d + 104 * e + 105 * f)) // 100
print(1 if 0 <= a else 0)

Solution (Python):
X = int(input())
n = X//100
X -= 100*n
print(0 if X > 5*n else 1)

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

N_100 = N // 100

ANS = 1

if N_100 == 0:
  ANS = 0

for i in range(20):
  if (N > (i + 1) * 100 + (i + 1)*5) and (N < ((i + 2) * 100)):
    ANS = 0
    break

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

Solution (Python):
n = int(input())
print([0, 1][n%100<=5*(n//100)])

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

Solution (Python):
def main():
  X = int(input())
  max = X // 100
  two = X - max * 100
  count = 0
  for i in range(5 ,0, -1):
    count += two // i
    two %= i
  print(0) if count > max else print(1)


if __name__ == '__main__':
  main()

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

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

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

for i in range(5,0,-1):
    x -= (100+i)*(amari//i)
    amari = amari%i

if x >= 0:
    print(1)
else:
    print(0)

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

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

Solution (Python):
import sys
from functools import lru_cache

N = int(input())
sys.setrecursionlimit(10 ** 9)


@lru_cache(maxsize=10 ** 9)
def dfs(x):
    ans = False
    if x == 0:
        return True
    elif x < 0:
        return False
    else:
        ans |= dfs(x - 100)
        ans |= dfs(x - 101)
        ans |= dfs(x - 102)
        ans |= dfs(x - 103)
        ans |= dfs(x - 104)
        ans |= dfs(x - 105)
    return ans

print(1 if dfs(N) else 0)

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

dp = [0] * (10**5+1)
dp[0] = 1

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

print(dp[x])

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

dp = [0] * 100001

dp[100] = dp[101] = dp[102] = dp[103] = dp[104] = dp[105] = 1

for i in range(106, 100001):
    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] * (X+1)
dp[0] = 1
for i in range(X+1):
    for j in range(100, 106):
        if i-j >= 0:
            dp[i] |= dp[i-j]
ans = dp[X]
print(ans)

Solution (Python):
import math

X = int(input())

i = 0
j = 0
while i < 1:
  q = (X - (100 * j)) // 100
  r = (X - (100 * j)) % 100 + (100 * j)
  
  if math.ceil(r / 5) <= q:
    print(1)
    break
    
  if (X - (100 * (j + 1))) <= 0:
    print(0)
    break
  
  j += 1

Solution (Python):

import sys
input = sys.stdin.readline

x = int(input())
if x >= 2100:
    print(1)
    exit()
n = x // 100
rest = x % 100
if rest <= n * 5:
    print(1)
else:
    print(0)

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




DP = [True]
for i in range(X): 
    if i+1-105 >= 0:
        DP_n = DP[i+1-100] or DP[i+1-101] or DP[i+1-102] or DP[i+1-103] or DP[i+1-104] or DP[i+1-105] 
    elif i+1==100 or i+1==101 or i+1==102 or i+1==103 or i+1==104:
        DP_n = True
    else:
        DP_n = False
    DP.append(DP_n)
print(int(DP[X]))

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

X = int(input())

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

print(0)

Solution (Python):
x=int(input())
if x<100:
	print(0)
elif x>=100:
	a=int(str(x)[-2:])
	b=int(str(x)[:-2])
	counter=0
	while a>=5:
		a-=5
		counter+=1
	while a>=4:
		a-=4
		counter+=1
	while a>=3:
		a-=3
		counter+=1
	while a>=2:
		a-=2
		counter+=1
	while a>=1:
		a-=1
		counter+=1
	print(1 if counter<=b else 0)

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

for i in range(1,1000001):
  if 100*i <= X and 105*i >=X:
    flag = 1
    
if flag == 1:
  print("1")
else:
  print("0")

Solution (Python):
x = int(input())
f = False
for d in range(10000):
    if 100 * d > x:
        break
    if 0 <= x - 100 * d <= 5 * d:
        f = True
print(int(f))

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

if X<100:
    print(0)
    exit()

if 100<=X<=105:
    print(1)
    exit()

DP=[False]*(X+1)

for i in range(100,106):
    DP[i]=True

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]=True

if DP[X]==True:
    print(1)
elif DP[X]==False:
    print(0)

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

Solution (Python):
x=int(input())
ans=0
c=1
for i in range(1,x):
    l,r=100*i,105*i
    if x>=l and x<=r:
        ans=1
        break

print(ans)

Solution (Python):
X=int(input())
if X-(X//100)*100>5*(X//100):
  print('0')
else:
  print('1')

Solution (Python):
number=int(input())
div100=int(number//100)
get100=div100*100
diff100=number-get100
div5=int(diff100//5) 
mod5=diff100%5
if (div5*100<number and number>=100 and div100*5>=diff100)or diff100%100==0:
  print("1")
else:
  print("0")

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())
A = X % 100
B = int(X / 100)
if A > (B * 5):
	print(0)
else:
	print(1)

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

simo = X%100
uwa = (X - simo) // 100

syou = ((simo-1) // 5)

if uwa > syou:
    print(1)
else:
    print(0)

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

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

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

print(dp[X])

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




import math
if math.ceil(n/5) <= m:
  print(1)
else:
  print(0)

Solution (Python):
a = int(input())
tmp01 = a/100
tmp02 = a/105
n = a//100

if tmp01 >= n >= tmp02:
  print(1)
else:
  print(0)

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

dp = [False] * (x+1)
dp[0] = True
for i in range(1,x+1):
    if i < 99:
        continue
    else:
        if dp[i-100]:
            dp[i] = True
        elif dp[i-101]:
            dp[i] = True
        elif dp[i-102]:
            dp[i] = True
        elif dp[i-103]:
            dp[i] = True
        elif dp[i-104]:
            dp[i] = True
        elif dp[i-105]:
            dp[i] = True

if dp[x]:
    print(1)
else:
    print(0)

Solution (Python):
X=int(input())
if X-(X//100)*100>5*(X//100):
  print('0')
else:
  print('1')

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

check = [0]*(X+106)
check[0] = 1
for i in range(X+1):    
    if check[i] == 1:
        for tmp in [100, 101, 102, 103, 104, 105]:
            check[i + tmp] = 1


print(check[X])

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

num = X // 100

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

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

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

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

Solution (Python):
X = int(input())
mod = X % 100
q = int(X //100)
sum = 0
ans = 0
if q >= 100:
    ans = 1
else:
    for i in range (0,q+1):
        for j in range (0,q+1-i):
            for k in range (0,q+1-i-j):
                for l in range (0,q+1-i-k-j):
                    for m in range (0,q+1-i-j-k-l):
                        sum = i+(2*j)+(3*k)+(4*l)+(5*m)
                        if sum == mod:
                            ans = 1
print(ans)

Solution (Python):
X = int(input())
mod = X % 100
q = int(X //100)
sum = 0
ans = 0
if q >= 20:
    ans = 1
else:
    for i in range (0,q+1):
        for j in range (0,q+1-i):
            for k in range (0,q+1-i-j):
                for l in range (0,q+1-i-k-j):
                    for m in range (0,q+1-i-j-k-l):
                        sum = i+(2*j)+(3*k)+(4*l)+(5*m)
                        if sum == mod:
                            ans = 1
print(ans)

Solution (Python):
X = int(input())
q = X // 100
r = X % 100

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

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

dp = [False]*(X+1)
dp[0] = True

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

print(int(dp[X]))

Solution (Python):
x = int(input())
c = x // 100
if 100*c <= x and x <= 105*c:
    print(1)
    exit(0)
print(0)

Solution (Python):
x = int(input())
c = x // 100
if 100*c <= x and x <= 105*c:
    print(1)
    exit(0)
print(0)

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

x1 = x // 100
x0 = x % 100

cnt = 0
for i in reversed(range(1, 6)):
    cnt += x0 // i
    x0 %= i

ans = int(x1 >= cnt)
print(ans)

Solution (Python):

import sys

X = int(input())

if X < 100:
    print(0)
    sys.exit()

list_X = list(str(X))

one_X = list_X[-1]
ten_X = list_X[-2]

nessesary_money = 105 * 2 * int(ten_X)
if int(one_X) > 0 and int(one_X) <= 5:
    nessesary_money += 100 + int(one_X)
elif int(one_X) > 5:
    nessesary_money += 200 + int(one_X)

if nessesary_money <= X:
    print(1)
else:
    print(0)

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

dp = [0] * 100001
dp[100] = 1
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

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

print(dp[X])

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

Solution (Python):
n=int(input()) 
x=n%100
i=x//5
if x%5>0:
  i+=1
if (i<=(n//100)) and n>=100:
  print(1)
else:
  print(0)

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

dp = [False] * (X+1)
dp[0] = True
for i in range(1, X+1):
    dp[i] = any(dp[i-(X+1)-105:i-(X+1)-99])

print(int(dp[X]))

Solution (Python):
from collections import deque

def solve(X):
    if X >= 2000:
        return 1

    prices = list(range(100, 106))
    Q = deque([(0, 0)])
    while Q:
        i, pNow = Q.popleft()
        if i == 6:
            if pNow == X:
                return 1
        else:
            price = prices[i]
            for num in range(20):
                p2 = pNow + price*num
                if p2 > X: break
                Q.append((i+1, p2))

    return 0

X = int(input())

print(solve(X))

Solution (Python):

x = int(input())
v = x // 100
modv = x % 100

if v > 0 and modv / v <= 5:
    print(1)
else:
    print(0)

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

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

V = (100, 101, 102, 103, 104, 105)

Memo = [0] * (X+1)

if X < min(V):
    print (0)
    exit()

for i in range(len(V)):
    if V[i] > X:
      continue
    Memo[V[i]] = 1
    for j in range(1, X+1):
        if j - V[i] > 0:
            Memo[j] |= Memo[j-V[i]]

print (Memo[X])

Solution (Python):
import math

def main():
    X = int(input())
    
    c = X // 100
    mx = 105 * c
    mn = 100 * c
    if mn <= X <= mx:
        print(1)
    else:
        print(0)

if __name__ == "__main__":
    main()

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

dp = []

for i in range(x + 1):
  if i == 0:
    dp.append(1)
  elif i < 100:
    dp.append(0)
  elif i >= 100 and i <= 105:
    dp.append(1)
  elif 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.append(1)
  else:
    dp.append(0)
print(dp[x])

Solution (Python):
import math

def main():
    X = int(input())
    ans = False
    for i in range(X+1):
        mx = 105 * i
        mn = 100 * i
        if mn <= X <= mx:
            ans = True
    if ans:
        print(1)
    else:
        print(0)

if __name__ == "__main__":
    main()

Solution (Python):
import math

def main():
    X = int(input())
    cnt = X // 100
    diff = X - cnt * 100
    if diff <= 5 * cnt:
        print(1)
    else:
        print(0)

if __name__ == "__main__":
    main()

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



for c in range(1, x + 1):
  if x >= c * 100 and x <= c * 105:
    print(1)
    exit(0)
print(0)

Solution (Python):
x = int(input())
c = int(x / 100)


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

Solution (Python):
N = int(input())
num = N//100
mod = N%100
if mod>5*num:
  print(0)
else:
  print(1)

Solution (Python):
import math

X = int(input())
print(1 if math.ceil((X - (X // 100) * 100) / 5) <= X // 100 else 0)

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

max_num = X // 100 + 1

for i in range(max_num):
    if X >= 100 * i and X <= 105 * i:
        print("1")
        exit()

print("0")

Solution (Python):
X = int(input())
dp = [False] * (X + 1)
dp[0] = True
for x in range(X+1):
  if x - 100 >= 0 and dp[x-100] == True:
    dp[x] = True
  elif x - 101 >= 0 and dp[x-101] == True:
    dp[x] = True
  elif x - 102 >= 0 and dp[x-102] == True:
    dp[x] = True
  elif x - 103 >= 0 and dp[x-103] == True:
    dp[x] = True
  elif x - 104 >= 0 and dp[x-104] == True:
    dp[x] = True
  elif x - 105 >= 0 and dp[x-105] == True:
    dp[x] = True
  elif x % 100 == 0 or x % 101 == 0 or x % 102 == 0 or x % 103 == 0 or x % 104 == 0 or x % 105 == 0:
    dp[x] = True
print(1 if dp[-1] else 0)

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

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

Solution (Python):
x=int(input());y=x//100;z=x-y*100;ans=1 if z<=5*y else 0;print(ans);

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

N = X//100
while N>0:
    Y = X-100*N
    if 0<=Y<=5*N:
        print(1)
        break
    N-=1
else:
    print(0)

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

Solution (Python):

x = int(input())   

count = int(x/100)
if 100*count <= x and x <= 105*count:
    print(1)
else:
    print(0)

Solution (Python):
def solve():
	X = int(input())
	quotient = X // 100
	remainder = X % 100
	if 0 <= remainder and remainder <= 5 * quotient:
		print(1)
		exit()
	print(0)
solve()

Solution (Python):
x = int(input())
print(int(x%100<=(x//100)*5))

Solution (Python):



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

    
    
    
    dp = [False for _ in range(x + 200)]  
    dp[0] = True  

    for i in range(x + 10):
        if not dp[i]:
            continue

        
        for j in range(100, 106):
            dp[i + j] = True

    if dp[x]:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

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


def check_exist(X):
    for i in range(1, X + 1):
        start_point = i * 100
        end_point = i * 105
        for j in range(start_point, end_point + 1):
            if X == j:
                return True
                break


if check_exist(X):
    print(1)
else:
    print(0)

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


def check_exist(X):
    for i in range(1, X + 1):
        start_point = i * 100
        end_point = i * 105
        for j in range(start_point, end_point + 1):
            if X == j:
                return True


if check_exist(X):
    print(1)
else:
    print(0)

Solution (Python):



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

    if x < 100:
        print(0)
        exit()

    p, q = divmod(x, 100)

    if q <= p * 5:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())
print(int(x%100<=(x//100)*5))

Solution (Python):
def solve():
	X = int(input())
	for i in range(X + 1):
		rest = X - i * 100
		if 0 <= rest and rest <= 5 * i:
			print(1)
			exit()
		if rest < 0:
			break
	print(0)
solve()

Solution (Python):

N = int(input())

DP = [False]*(N+1000)
prices = [100,101,102,103,104,105]
DP[0] = True
for i in range(N):
    if DP[i]:
        for p in prices:
            DP[i+p] = True

if DP[N]:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
z=x/100
x=x%100
f=0
j=0
m=0
for i in range(1,1000):
    if i>z:
        break
    else:
        j+=1
        m=6+5*(j-1)
        if x<m:
            f=1
            break
if f:
    print("1")
else:
    print("0")

Solution (Python):
from sys import stdin
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
x = int(stdin.readline().rstrip())

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

Solution (Python):
x = int(input())
if x < 100:
    print(0)
    exit()

l_num = x // 100
l_sum = x % 100

if l_sum <= l_num * 5:
    print(1)
else:
    print(0)

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

Solution (Python):
import queue
x=int(input())
avail=list(range(100,106))
ok=[False]*max(x+1,106)
q=queue.Queue()
for i in avail:
    ok[i]=True
    q.put(i)
while not q.empty():
    f=q.get()
    for i in range(100,106):
        if(i+f<=x and not ok[i+f]):
            ok[i+f]=True
            q.put(i+f)
print(1 if ok[x] else 0)

Solution (Python):

X = int(input())

R = X / 100
Q = X % 100


cnt = 0

while(Q > 0):
  cnt+= 1
  if(Q < 5):
      Q = 0
  else:
      Q -=5
if cnt < R:
  print(1)
else:
  print(0)

Solution (Python):
X = int(input())
R = X / 100
Q = X % 100

cnt = 0
while (Q > 0):
    cnt += 1
    if (Q < 5):
        Q = 0
    else:
        Q -= 5

if cnt <= R:
    print(1)
else:
    print(0)

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

Solution (Python):
x = int(input())
k = int(x/100)
h = x%100
h2 = 0
for i in range(k):
    if h-h2>=5:
        h2+=5
    elif h-h2>=4:
        h2+=4
    elif h-h2>=3:
        h2+=3
    elif h-h2>=2:
        h2+=2
    elif h-h2>=1:
        h2+=1
    else:
        pass
print(1) if h2 == h else print(0)

Solution (Python):
x=int(input())
num=x//100
for i in range(100*num,105*num+1):
  if i==x:
    print(1);exit()
print(0)

Solution (Python):
X = int(input())
m = X % 100

S = 0
for i in range(1, 6)[:: -1]:
    S += (100 + i) * (m // i)
    m -= m // i * i

if S > X:
    print('0')
else:
    print('1')

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

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

print(ans)

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

dp = [0 for _ in range(100001)]
dp[0] = 1
dp[100] = 1
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1
for i in range(200, 100001):
    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

if dp[x]:
    print(1)
else:
    print(0)

Solution (Python):
import sys

def main():
    x = int(sys.stdin.readline().rstrip())
    q, r = divmod(x, 100)

    if 5 * q >= r:
        ans = 1
    else:
        ans = 0

    print(ans)

if __name__ == '__main__':
    main()

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

if a >= 1 and b <= 5 * a:
    print(1)
else:
    print(0)

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

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

Solution (Python):
X=int(input())
while X>0:
  if X%100>=5 :X-=105
  elif X%100==4:X-=104
  elif X%100==3:X-=103
  elif X%100==2:X-=102
  elif X%100==1:X-=101
  elif X%100==0:break

if X>=0:print(1)
else:print(0)

Solution (Python):
from itertools import combinations_with_replacement as comb

def f(n, h):
    for i in comb(range(6), n):
        if sum(i) == h:
            return 1
    return 0

if __name__ == '__main__':
    x = int(input())
    n = x // 100
    h = x - 100 * n
    print(f(n, h))

Solution (Python):
x=int(input())
dp=[0]*(x+1)
dp[0]=1
for i in range(1,x+1):
  if i-100>=0:
    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 i in range(X+1)]
if X <100:
    print(0)
elif X <= 105:
    print(1)
else:
    for i in range(100,106):
        dp[i] =1
    for i in range(100,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[-1])

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

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

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

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


def main():
    X = int(input())
    dp = [0]*(X+1)
    dp[0] = 1

    for i in range(X):
        if dp[i]==0:
            continue
        for j in range(6):
            if i + (100 + j) <= X:
                dp[i + (100 + j)] = 1

    print(dp[X])
    


if __name__ == '__main__':
    main()

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

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

quo = x // 100
rem = x % 100

req = rem // 5

if rem % 5:
  req += 1
  
if req > quo:
  print(0)
else:
  print(1)

Solution (Python):
x = int(input())
x1 = x // 100
x2 = x % 100
if x1*5 >= x2:
  print(1)
else:
  print(0)