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 os
import sys


def main():
    X = read_int()
    print('1' if solve(X) else '0')


def solve(X):
    c = X // 100
    for d in range(6):
        n = c - d
        if n < 0:
            break
        r = X - 100 * n
        if 0 <= r <= n * 5:
            return True
    return False




DEBUG = 'DEBUG' in os.environ


def inp():
    return sys.stdin.readline().rstrip()


def read_int():
    return int(inp())


def read_ints():
    return [int(e) for e in inp().split()]


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


if __name__ == '__main__':
    main()

Solution (Python):
A = [0]*100201
A[0] = 1

for i in range(100000):
    if A[i]:
        A[i+100] = 1
        A[i+101] = 1
        A[i+102] = 1
        A[i+103] = 1
        A[i+104] = 1
        A[i+105] = 1

print(A[int(input())])

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

n = onem()

co = 0
cco = 0

for i in range(1,1000):
    co += 105
    cco += 1
    if n <= co:
        break

kkk = co - n

if kkk == 0:
    print(1)
else:
    if kkk <= cco * 5:
        print(1)
    else:
        print(0)

Solution (Python):
a=int(input())
b=a//100
c=a%100
if c/5<=b:
  print(1)
else:
  print(0)

Solution (Python):
X = int(input())
n = X / 100
y = X % 100

if y % 5 == 0:
    m = y // 5
else:
    m = y//5 + 1

if m <= n:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
tmp = [0]*(10**5+107)
tmp[0] = 1
S = [i for i in range(100, 106)]
for i in range(10**5+1):
    for j in S:
        tmp[i+j] = tmp[i]+tmp[i+j]
if tmp[X] > 0:
    print(1)
else:
    print(0)

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

if x >= 2000:
  print(1)

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

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

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

print (0)

Solution (Python):
X = int(input())
tmp = X//100
lis = list(range(tmp*100,tmp*100+5*tmp+1))
if X in lis:
    print(1)
else:
    print(0)

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

Solution (Python):
def solve(x):
    y = x % 100
    ny = y // 5
    if y % 5 != 0:
        ny += 1
    if x // 100 >= ny:
        return 1
    else:
        return 0


def main():
    x = int(input())
    res = solve(x)
    print(res)


def test():
    assert solve(615) == 1
    assert solve(217) == 0


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

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

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

Solution (Python):
n = int(input())
q, r = divmod(n, 100)
c = 0
for i in range(5, 0, -1):
  a, b = divmod(r, i)
  c += a
  r = b
if q >= c:
  print(1)
else:
  print(0)

Solution (Python):
Ans = [False] * 100001
Ans[0] = True
for i in range(1, 100001):
    for v in range(100, 106):
        Ans[i] |= Ans[i-v]
print(int(Ans[int(input())]))

Solution (Python):


import sys
readline = sys.stdin.readline 

x = int(input())






if x >= 10000: print(1)
else:
    q = x//100
    r = x%100
    
    c = r//5
    if r%5: c += 1
    
    if q >= c:
        print(1)
    else:
        print(0)

Solution (Python):
import math


def main():
    n = int(input())
    dp = [0] * (n + 1)
    dp[0] = 1
    for i in range(1, n + 1):
        for j in range(100, 106):
            if i - j >= 0:
                dp[i] = dp[i] | dp[i-j]
    print(dp[n])

if __name__ == "__main__":
    main()

Solution (Python):
X = int(input())
N = X//100
m = X%100
if (m+4)//5 <=N:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
start = 100
end = 100000
flag = False
for i in range(1, int(end / start) + 1):
    if start <= x <= start + i * 5:
        flag = True
        break
    else:
        start += 100

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

Solution (Python):
def main():
    n = int(input())
    a = (n-n%100)//100
    b = n%100
    if 5*a >= b:
        print("1")
    else:
        print("0")
        
if __name__ == '__main__':
    main()

Solution (Python):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

x = ni()
can = False
for i in range(1, x + 1):
    if 0 <= x - 100*i <= 5*i:
        can = True
        break
    if x - 100*i < 0:
        break
print('1' if can else '0')

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

ans = 0
if(X < 100): ans = 0
else:
 count = X//100
 res = X - count*100
 if(0<= res <= 5*count):
   ans = 1
print(ans)

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

dp = [0] * (X+1)
dp[0] = 1
for i in range(1, X+1):
    for j in range(100, 105+1):
        if i >= j and dp[i-j]:
            dp[i] = 1
print(dp[X])

Solution (Python):

import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()



def main():
    X = ii()
    n = X // 100
    for i in range(n, 0, -1):
        if(X - 100 * i < 0):
            break
        if(5 * i < X - 100 * i):
            continue
        else:
            exit(1)
    print(0)

    return


if __name__ == '__main__':
    main()

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

Solution (Python):

import sys, math, itertools, heapq, collections, bisect, string, copy
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
mod = 10**9+7
ans = count = 0; pro = 1


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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def solve():
    x = II()
    dp = [0] * (x + 1)
    dp[0] = 1
    for i in range(6):
        a = 100 + i
        for i in range(a, x + 1):
            dp[i] |= dp[i - a]
    print(dp[-1])
    return



if __name__ == '__main__':
    solve()

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
from itertools import count
from functools import lru_cache
from collections import defaultdict
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok



def main():
    X = ii()
    @lru_cache(maxsize=None)
    def rec(n):
        if n == 0:
            return True
        elif n < 0:
            return False
        else:
            return any(rec(n-i) for i in range(100, 105+1))
    
    print(int(rec(X)))




main()

Solution (Python):
def main():
    X = int(input())
    M = int(1e5+1)
    dp = [False] * M
    dp[0] = True
    for i in range(M):
        for j in range(100, 106):
            if i - j >= 0:
                dp[i] |= dp[i-j]
    if dp[X]:
        print(1)
    else:
        print(0)


if __name__ == "__main__":
    main()

Solution (Python):
X=int(input())
if X>=2000:
  print(1)
else:
  r=X%100
  q=X//100
  if r>q*5:
    print(0)
  else:
    print(1)

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

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

C = [0 for _ in range(X + 1)]
C[0] = 1
cost = [100, 101, 102, 103, 104, 105]

for x in range(X):
    for c in cost:
        if x + c > X:
            continue
        C[x + c] += C[x]

print(1 if C[X] != 0 else 0)

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

Solution (Python):
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]






X = int(input())

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

Solution (Python):

import sys
input = sys.stdin.buffer.readline


from collections import defaultdict


def getlist():
	return list(map(int, input().split()))


def main():
	X = int(input())
	DP = [0] * 100200
	DP[0] = 1
	for i in range(100001):
		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

	if DP[X] == 1:
		print(1)
	else:
		print(0)

if __name__ == '__main__':
	main()

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

Y = X // 100

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

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

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


for k in range(1001):
    a = x
    a -= 100 * k
    if 0 <= a and a <= 5*k:
        print('1')
        exit()

print('0')

Solution (Python):

X = int(input())
x = X%100
N = X//100

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

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

dp = [False for _ in range(100001)]
def main():
    x = ri()
    lp = [100, 101, 102, 103, 104, 105]
    dp[0] = True
    for p in lp:
        for i in range(x+1):
            if not dp[i]:
                continue
            if i+p > x:
                continue
            dp[i+p] = True
    if dp[x]:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    X = int(input())
    dp = [False] * (X + 1)
    dp[0] = True
    for i in range(X + 1):
        if dp[i]:
            for x in [100, 101, 102, 103, 104, 105]:
                if i + x <= X:
                    dp[i + x] = True
    print(1 if dp[X] else 0)


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
dp=[0]*(100201)
dp[0]=1
for i in range(100001):
    if dp[i]>0:
        for j in range(6):
            dp[i+j+100]=1
if dp[n]>0:
    print(1)
else:
    print(0)

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

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

q = X // 100
r = X % 100

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

Solution (Python):

x = int(input())
N = 500000
dp = [False] * N
dp[0] = True
for i in range(N - 110):
    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] |= dp[i]
print(0 + dp[x])

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

Solution (Python):


import math
import sys
import itertools
import numpy as np

n =int(input())


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

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

dp = [1] + [0] * x
for i in range(x):
    if not dp[i]:
        continue
    for j in range(100, 106):
        if i + j <= x:
            dp[i + j] = 1
print(dp[x])

Solution (Python):
X = input()
for i in range(1001):
  if 0<=X-100*i<=5*i:
    print 1
    break
else:
  print 0

Solution (Python):
n = int(input())
f = [0]*(n+1)
f[0] = 1
for x in range(1, n+1):
	for i in range(100, 106):
		if x-i >= 0 and f[x-i] == 1:
			f[x] = 1
print(f[n])

Solution (Python):
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
import itertools
import string
import queue
import copy


from itertools import permutations, combinations
from heapq import heappop, heappush

sys.setrecursionlimit(10**8)
mod = 10**9+7
 
def inp(): 
    return int(input())
def inpm(): 
    return map(int,input().split())
def inpl(): 
    return list(map(int, input().split()))
def inpls(): 
    return list(input().split())
def inplm(n): 
    return list(int(input()) for _ in range(n))
def inpll(n): 
    return [list(map(int, input().split())) for _ in range(n)]

def main():
    x=inp()
    n=x//100
    for i in range(n+1):
        y=x-100*i
        if y<=i*5:
            print(1)
            return
    print(0)

if __name__ == "__main__":
    main()

Solution (Python):
import sys
from itertools import combinations, permutations

def solve():
    input = sys.stdin.readline
    X = int(input())
    all100 = X // 100
    if X - all100 * 100 > 5 * all100: print(0)
    else: print(1)

    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
X=int(input())
f=False
for i in range(1001):
    if i*100<=X<=i*105:
        f=True
        break

print('1' if f else '0')

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    x = int(readline())
    c = x // 100
    x %= 100
    print(1 if 0 <= x <= 5 * c else 0)


if __name__ == '__main__':
    solve()

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

Solution (Python):
import sys
readline = sys.stdin.readline

X = int(readline())

ans = 0
for i in range(1, X):
    if X - 100*i < 0:
        break
    if 0 <= X-100*i <= 5*i:
        ans = 1
        break
print(ans)

Solution (Python):
X = int(input())
t = X%100
k = X//100

if k*5 >= t:
    print(1)
else:
    print(0)

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
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
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    X=I()
    boo = [1]+[0]*X
    A = [100,101,102,103,104,105]
    for a in A:
        for i in range(X+1):
            if i-a>=0 and boo[i-a]:
                boo[i]=True
    print(int(boo[X]))
if __name__ == '__main__':
    main()

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

def solve() :
    for i in range(10000) :
        if 100 * i <= X <= 105 * i :
            return 1
    return 0
    
print(solve())

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    x = I()
    m = 100001
    dp = [0]*m
    dp[0] = 1
    for j in (100,101,102,103,104,105):
        for i in range(m):
            if dp[i]:
                k = i+j
                if k < m:
                    dp[k] = 1
    print(dp[x])
    return


if __name__ == "__main__":
    solve()

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

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

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

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

for i in range(1001):
    y = x - (i * 100)
    if y < 0:
        break
    if y <= i*5:
        print(1)
        import sys
        sys.exit()
print(0)

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

d, m = divmod(X, 100)

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

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

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

Solution (Python):
import queue
import math
import copy
"""
N = int(input())



A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""

N = int(input())
A = N//100
B = N%100

print((A*5>=B)*1)

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

Solution (Python):
x = int(input())
dp = [0]*(x+1)
dp[0] = 1
for i in range(x):
    if dp[i] == 0:continue
    for v in [t for t in range(100,106)]:
        if i + v <= x:
            dp[i + v] = 1
print(dp[x])

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
def input():
    return sys.stdin.readline().rstrip()

def main():
    X=int(input())
    n=X//100
    m=X%100
    print(1 if -(-m//5)<=n else 0)

if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())
DP = [0]*(x+1)
DP[0] = 1
for i in range(x):
    if not DP[i]:
        continue
    for j in range(6):
        k = i+100+j
        if 0<=k<=x:
            DP[k] = 1
print(DP[-1])

Solution (Python):
x=int(input())
n=x//100
x%=100
a=0
for i in [5,4,3,2,1]:
  while x>i-1:
    x-=i
    a+=1
if a>n:print(0)
else:print(1)

Solution (Python):
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: break
        dp[i+100+j] = 1
print(dp[-1])

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  X=I()

  sm1=sm2=0
  for i in range(1010):
    sm1+=100
    sm2+=105
    if sm1<=X and X<=sm2:
      return 1
  return 0


print(main())

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    x=int(input())
    for k in range(1,1001):
        if(100*k<=x<=105*k):
            print(1)
            return
    print(0)
resolve()

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

X = int(read())

def test(x):
    low = 100 * x
    high = 105 * x
    return low <= X <= high

bl = any(test(x) for x in range(X))

print(bl * 1)

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

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

print(0)

Solution (Python):
import sys
input = sys.stdin.readline

X=int(input())

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

Solution (Python):

X = int(input())

w = X // 100
amari = X % 100

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

Solution (Python):
import sys

X = int(input())

for i in range(10000):
  if i * 100 <= X <= i * 105:
    print(1)
    sys.exit()

print(0)

Solution (Python):

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

X = inp()
dp = [False]*(X+200)

dp[0] = True

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


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

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

Solution (Python):
X = [0] * 101010
X[0] = 1

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

print(X[int(input())])