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

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd



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


def MI(): return map(int, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


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


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['Yes', 'No']
MOD = 10**9+7
inf = float('inf')
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)


show_flg = False



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

    for i in range(0, X):
        if dp[i] == 1:
            for k in range(100, 106):
                if i + k < len(dp):
                    dp[i+k] = 1

    print(dp[X])


if __name__ == '__main__':
    main()

Solution (Python):

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd



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


def MI(): return map(int, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


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


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['Yes', 'No']
MOD = 10**9+7
inf = float('inf')
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)


show_flg = False



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

    for i in range(1, 1001):
        if 100 * i <= X and 105 * i >= X:
            print(1)
            return

    print(0)


if __name__ == '__main__':
    main()

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

Solution (Python):
X = int(input())
div = X //100

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

Solution (Python):


x = int(input())

item_number = x // 100
target = x % 100

for i0 in range(item_number + 1):
    for i1 in range(item_number + 1 - i0):
        for i2 in range(item_number + 1 - i0 - i1):
            for i3 in range(item_number + 1 - i0 - i1 - i2):
                for i4 in range(item_number + 1 - i0 - i1 - i2 - i3):
                    for i5 in range(item_number + 1 - i0 - i1 - i2 - i3 - i4):
                        if i1 + (i2 * 2) + (i3 * 3) + (i4 * 4) + (i5 * 5) == target:
                            print(1)
                            exit()
print(0)

Solution (Python):


x = int(input())

for i in range(1, 1000001):
    if 100*i <= x <= 105*i:
        print(1)
        break
else:
    print(0)

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


if __name__ == '__main__':
    solve()

Solution (Python):
X = list(input())
if len(X)<=2:
    print(0)
    exit()
con = X[len(X)-2:len(X)]
kak = X[0:len(X)-2]
kak = int("".join(kak))
con = int("".join(con))
if con>=5:
    imp1 = con//5
    imp2 = con%5
else:
    imp1 = 1
    imp2 = 0

if kak>=imp1+imp2:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
def judge(x):
    for i in range(1,1000):
        bottom = i*100
        top = i*105
        if bottom <=  x <= top:
            return 1
    return  0

print(judge(x))

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

Solution (Python):
n = int(input())
L = [i for i in range(100,2001,100)]

LL = []
for i in L:
    n1 = int(str(i)[0])
    n2 = int(str(i)[0]+str(i)[1])
    len1 = len(str(i))
    if len1 == 3:
        LL.append((n1*100+5*n1+1,(n1+1)*100-1))
    else:
        LL.append((n2*100+5*(n2)+1,(n2+1)*100-1))
LL = [(1,99)] + LL
LL.pop()

for i in range(len(LL)):
    if LL[i][0] <= n <= LL[i][1]:
        print(0)
        exit()
print(1)

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

p = x%100
n = (x-p)//100
b = 0
for i in range(n+1):
    if b==1:
        break
    for j in range(n+1-i):
        if b==1:
            break
        for k in range(n+1-i-j):
            if b==1:
                break
            for l in range(n+1-i-j-k):
                if b==1:
                    break
                for m in range(n+1-i-j-k-l):
                    if i + 2*j + 3*k + 4*l + 5*m == p:
                        print(1)
                        b =1
                        break
if b==0:
    print(0)

Solution (Python):









import sys



ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    for i in range(1, 1000):
        x_min = 100 * i
        x_max = 105 * i

        if x_min <= x <= x_max:
            print(1)
            sys.exit()

    print(0)


if __name__ == '__main__':
    main()

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

product = list(range(100,105+1))

dp = [0] * 10**6

dp[0] = 1
for i in product:
    dp[i] = 1

for i in range(0,10**5+1):
    for j in product:
        if dp[i] == 1:
            dp[i+j] = 1

print(dp[x])

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

n = X // 100

ansup = 100 * n
ansbottom = 105 * n

if X >= ansup and X <= ansbottom:
	print(1)
else:
	print(0)

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

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

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

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

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

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

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

x = int(input())

if 105 * math.floor(x / 100) >= x:
  ans = '1'
else:
  ans = '0'

print(ans)

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

for i in range(100, X+1):
    d[i] = any(d[i-j] for j in (100, 101, 102, 103, 104, 105)) 

print(int(d[X]))

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

for i in range(100, X+1):
    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(dp[X])

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

for i in range(X+1):
    for j in [100, 101, 102, 103, 104, 105]:
        if i-j>=0 and dp[i-j]:
            dp[i] = 1

print(dp[X])

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

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

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

Solution (Python):
n=int(input())
dp=[False]*(n+1)
dp[0]=True
l=list(range(100,106))
for i in l:
  for j in range(100,n+1):
    if j>=i and dp[j-i]==True:
      dp[j]=True
print(1*dp[-1])

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

Solution (Python):
coins = [100, 101, 102, 103, 104, 105]
MAX = 100000

result = [0]*(MAX+1)


for price in range(1,MAX+1):
    if (price in coins):
        result[price] = 1
    else:
        result[price] = 0

for coin in coins:
    for price in range(106, MAX + 1):
        result[price] += result[price-coin]

X = int(input())
if(result[X] >= 1): print('1')
else : print('0')

Solution (Python):
coins = [100, 101, 102, 103, 104, 105]
MAX = 100000

result = list()
for i in range(MAX + 1):
    if(i % coins[0] == 0) : result.append(1)
    else : result.append(0)


for coin in coins[1:]:
    for j in range(coin, MAX+1):
        result[j] += result[j-coin]

X = int(input())
if(result[X] >= 1): print('1')
else : print('0')

Solution (Python):
X = int(input())
items = X // 100

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

Solution (Python):
d = [0] * 200000
d[100] = 1
d[101] = 1
d[102] = 1
d[103] = 1
d[104] = 1
d[105] = 1
for i in range(110, 100000 + 1):
    d[i] += d[i-100]
    d[i] += d[i-101]
    d[i] += d[i-102]
    d[i] += d[i-103]
    d[i] += d[i-104]
    d[i] += d[i-105]
n = int(input())
print("1" if d[n] != 0 else "0")

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

Solution (Python):
n=int(input())
dp=[0]*(10**5+1)
dp[0]=1
for i in range(n+1):
  for j in range(100,106):
    dp[i]=max(dp[i],dp[i-j])
if dp[n]==1:
  print(1)
else:
  print(0)

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

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

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

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

maxketa = n//100

if n <= maxketa*100+5*maxketa:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
y = x//100
ans = 0
for i in range(y,0,-1):
  if x - 100*i <= 5*i:
    ans = 1
    break
print(ans)

Solution (Python):
X = int(input())
p = X//100
q = X-p*100
ret = q <= p*5
print(int(ret))

Solution (Python):
x = int(input())
dp = [False] * max(106, x + 1)
for i in range(100, 106):
    dp[i] = True
for i in range(106, x + 1):
    dp[i] = any(dp[i - j] for j in range(100, 106))
print(1 if dp[x] else 0)

Solution (Python):
def solve1(x):
    for c in range(1, x+1):
        if 100*c <= x <= 105*c:
            print(1)
            exit()
    print(0)

def solve2(x):
    dp = [0 for _ in range(100000+1)]
    for i in range(100, 106):
        dp[i] = 1

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

x = int(input())
solve2(x)

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

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

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

Solution (Python):


y=int(input())

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

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

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

Solution (Python):
def main():
    X = int(input())
    if 2000 <= X:
        return print(1)
    if X < 100:
        return print(0)
    if X < 1000:
        c = str(X)
        c = int(c[0])*100 + int(c[0])*5
        if X <= c:
            return print(1)
        else:
            return print(0)
    else:
        c = str(X)
        c = int(c[:2])*100 + int(c[:2])*5
        if X <= c:
            return print(1)
        else:
            return print(0)


if __name__ == '__main__':
    main()

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

num=x//100
print(1 if num*5+100*num>=x else 0)

Solution (Python):
x=int(input())
if x<100:
  print(0)
  exit()
elif 100<=x<=105:
  print(1)
  exit()
else:
  DP=[False]*(x+1)
  for i in range(x+1):
    coin=list(range(100,106,1))
    if i in coin:
      DP[i]=True
      continue
    DP[i]=True if any(DP[i-m] for m in coin) else False
  print(1 if DP[x]==True else 0)

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

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

Solution (Python):
def main():
    X = int(input())
    DP = [0 for _ in range(100001)]

    for j in range(100, 106):
        DP[j] = 1

    for i in range(100001):
        for j in range(100, 106):
            idx = i - j
            if idx >= 0 and DP[idx] == 1:
                DP[i] = 1

    print(DP[X])
if __name__ == '__main__':
    main()

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

u = x % 100
r = x // 100
isOk = False
for i in range(r+1):
    if u <= 0:
        isOk = True
        break
    u -= 5
print("01"[isOk])

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

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

Solution (Python):
from sys import stdin
X = int(stdin.readline().rstrip())

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):
import sys
input = sys.stdin.readline

X = int(input())

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

c = [100,101,102,103,104,105]

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

Solution (Python):

def main():
    X = int(input())
    check = lambda x: x * 100 <= X <= x * 105
    is_possible = any(check(i) for i in range(X))
    print(int(is_possible))


if __name__ == "__main__":
    main()

Solution (Python):

def main():
    X = int(input())
    check = lambda x: x * 100 <= X <= x * 105
    is_possible = any(check(i) for i in range(X))
    print(int(is_possible))


if __name__ == "__main__":
    main()

Solution (Python):
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def new(t):
    for r in t:
        tmp = []
        cnt = 0
        for b in [100, 101, 102, 103, 104, 105]:
            nex = r - b
            if nex == 0 or r % b == 0:
                return 1
            elif nex < 100:
                cnt += 1
                if cnt == 6:
                    return 0
            tmp.append(nex)
        t = tmp
    
    return new(t)
        

def main():
    x = ni()

    t = [x]
    return new(t)
    

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

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

dp = [0]*100200
dp[0] = 1
for i in range(0,100200):
    if dp[i-105]:
        dp[i] = 1
    if dp[i-104]:
        dp[i] = 1
    if dp[i-103]:
        dp[i] = 1
    if dp[i-102]:
        dp[i] = 1
    if dp[i-101]:
        dp[i] = 1
    if dp[i-100]:
        dp[i] = 1
 
print(dp[n])

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

dp = [0]*100200
dp[0] = 1
for i in range(0,100200):
    if dp[i-105]:
        dp[i] = 1
    if dp[i-104]:
        dp[i] = 1
    if dp[i-103]:
        dp[i] = 1
    if dp[i-102]:
        dp[i] = 1
    if dp[i-101]:
        dp[i] = 1
    if dp[i-100]:
        dp[i] = 1

print(dp[n])

Solution (Python):
X = int(input())
x = X % 100
A, a = x // 5, x % 5
B, b = a // 4, a % 4
C, c = b // 3, b % 3
D, d = c // 2, c % 2
E = d % 2
if(X - X % 100 >= 100 * (A + B + C + D + E)):
  print(1)
else:
  print(0)

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

Solution (Python):
x=int(input())
y=1  
if x<100:
  print(0)
else:
  while y<=x//100+1:
    if y*100<=x<=y*105:
      print(1)
      break
    elif y>x//100:
      print(0)
      break
    else:
      y+=1

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

s = X // 100
t = X % 100

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

Solution (Python):
X = int(input())
X_ = X % 100
N = int(X / 100)
ans = 0
for i in range(5):
    X_ -= N

if X_ > 0:
    print(0)
else:
    print(1)

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

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

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

ｄｐ=[0]*(x+1)
dp[0]=1
for i in range(100,x+1):
  for j in range(100,106):
    if dp[i-j]:
	    dp[i]=dp[i-j]
print(dp[x])

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

Solution (Python):

import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def solve(X: int):
    prices = [100, 101, 102, 103, 104, 105]
    flag = [None]*(100000+1)
    flag[0] = True

    def rec(x):
        if flag[x] is not None:
            return flag[x]

        if x < 100:
            flag[x] = False
            return False

        fff = False
        for p in prices:
            fff = fff or rec(x-p)
            if fff == True:
                break
        flag[x] = fff
        return fff

    print(int(rec(X)))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  
    solve(X)


if __name__ == '__main__':
    main()

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

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
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 list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    x = I()
    t = x // 100
    u = x % 100
    if u <= t * 5:
        return 1

    return 0


print(main())

Solution (Python):
x=int(input())
a=int(x/100)
r=x-a*100
if r/5<=a:
    print(1)
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):
X = int(input())
if(X >= 2100):
    print(1)
else:
    ct = X // 100
    r = X % 100
    if(r <= ct * 5):
        print(1)
    else: 
        print(0)

Solution (Python):

x = int(input())

l = [0]*(x+1)
l[0] = 1
for i in range(1,x+1):
    for j in range(100,106):
        if i-j>=0:
            l[i] += l[i-j]

if l[x]>0:
    print(1)
else:
    print(0)

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

if 0<=x%100<=5*n:
    print(1)
else:
    print(0)

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

left=-1
right=1000000
while left<right-1:
   mid=(left+right)//2
   if 105*mid<X:
      left=mid
   else:
      right=mid

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

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

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

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

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

Solution (Python):
a = int(input())
b = a % 100
c = a // 100
for i in range(c):
    for j in range(5, 0, -1):
        if b >= j:
            b -= j
            break
    if b == 0:
        print(1)
        break
else:
    print(0)

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

Solution (Python):
X = int(input())
DP = [0 for i in range(1000000)]
DP[0] = 1
a = [100, 101, 102, 103, 104, 105]
for i in a:
    for j in range(X):
        if DP[j] == 1:
            DP[j + i] = 1
print(DP[X])

Solution (Python):
X = int(input())
import sys
q = X // 100
r = X % 100
if r >= 0 and r <= 5 * q:
    print(1)
    sys.exit()
print(0)

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

Solution (Python):

dp = [0] * 100104
dp[0] = 1
X = int(input())

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

Solution (Python):
X = int(input())
N = pow(10,5)

dp = [0]*(N+1)
for i in range(6):
    dp[100+i]=1

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

print(dp[X])

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

Solution (Python):
x = int(input())
x_ = x%100
n = x//100
if x >= 2300:
    print(1)
else:
    min_n = (x_-1)//5 + 1
    if min_n > n:
        print(0)
    else:
        print(1)

Solution (Python):
n=int(input())
q,r=divmod(n,100)
cnt=0
i=5
while cnt<q:
	if r>=i:
		cnt+=1
		r-=i		
	else:
		i=max(i-1,0)
print(1 if r==0 else 0)

Solution (Python):
price = int(input())
x = price // 100
y = price % 100
if price < 100:
  	val = 0
elif y / x <= 5:
	val = 1
else:
  	val = 0
print(val)

Solution (Python):
X=int(input())
a=X//100
b=X%100
c=b%10
b=b//10
d=c%5
c=c//5
if d>0:
  e=1
else:
  e=0
temp=2*b+c+e
if temp>a:
  print(0)
else:
  print(1)

Solution (Python):
N=int(input())
d,m=divmod(N,100)
print(['0','1'][m<=(d*5)])

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

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

Solution (Python):
X = int(input())
dp = [False for _ in range(100001)]
dp[0] = True
for i in range(100,106):
    dp[i] = True
for i in range(107, X + 1):
    if dp[i - 100] == True or dp[i - 101] == True or dp[i - 102] == True\
        or dp[i - 103] == True or dp[i - 104] == True or dp[i - 105] == True:
        dp[i] = True

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

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

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

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

Solution (Python):
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    x = int(input().rstrip('\n'))
    d, m = divmod(x, 100)
    print(1 if 0 <= m <= d * 5 else 0)


if __name__ == '__main__':
    solve()

Solution (Python):
n = int(input())
low = 0
high = 0
for _ in range(1000):
  low += 100
  high += 105
  if low <= n <= high:
    print(1)
    exit()
print(0)

Solution (Python):
X=int(input())
M=X//100
for i in range(M+1):
    j=X-(100*i)
    if 0<=j<=5*i:
        print(1)
        exit()
print(0)

Solution (Python):
def main(x: int):
    c = x // 100

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


if __name__ == '__main__':
    x = int(input())

    main(x)

Solution (Python):
total = int(input())
x, y = divmod(total, 100)
z,a = divmod(y, 5)
if a:
	z += 1
if z > x:
	print(0)
else:
	print(1)

Solution (Python):
X = int(input())
def countWays(costList, aim):
    an = [1] + [0]*(10**5+105)
    for i in range(aim):
        for j in costList:
           an[i+j] = max(an[i+j],an[i])
    return an[aim]

print(countWays([100,101,102,103,104,105],X))

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

Solution (Python):
from __future__ import print_function

import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return















































def main():
    x = int(input().strip())
    d10 = x%100
    
    a=0
    b=0
    c=0
    d=0
    e=0
    
    f = d10//5
    
    if d10%5==0:
        pass
    elif d10%5==1:
        b=1
    elif d10%5==2:
        c=1
    elif d10%5==3:
        d=1
    elif d10%5==4:
        e=1
    else:
        try:
            raise ValueError("error!")
        except ValueError as e:
            eprint(e)

    if (b+c+d+e+f)*100<=x:
        print(1)
    else:
        print(0)
    return

if __name__ == '__main__':
    main()


'''
for given X (1<=X<=10**5).
exits (a,b,c,d,e,f \in [0...10**6]).
100*a + 101*b + 102*c + 103*d + 104*e + 105*f == X



100*(a+b+c+d+e+f) + (b + 2*c + 3*d + 4*e + 5*f) == X
(b + 2*c + 3*d + 4*e + 5*f) == X - 100*(a+b+c+d+e+f)

Xの下二桁をみると，
(b + 2*c + 3*d + 4*e + 5*f) % 100 =  (Xの下二桁) ---(1)
かつ
X >= 

100*(a+b+c+d+e+f) 
が成立．


このとき
(1)を満たす中で
b+c+d+e+fが最小の場合を考えると
let d0 and  d1 (0 <= d0,d1 <= 9) such that
	10*d1 + 1*d0  = (Xの下二桁)

(10*d1 + 1*d0) // 5 -> f
(10*d1 + 1*d0) % 5 -> 
(if 1 then b else b ->0
 if 2 then c else c ->0
 if 3 then d else d ->0
 if 4 then e else e ->0
)
の場合であることが分かる．(後述)
このとき
Xが小さすぎなければ，
乃ち
100*(b+c+d+e+f) <= X 
のとき，乃ち
  ( (100*(b+c+d+e+f) <= X) and ((b + 2*c + 3*d + 4*e + 5*f) % 100 == (Xの下二桁)) )

such that 
 (但し b,c,d,e は
  (10*d1 + 1*d0) // 5 -> f
  (10*d1 + 1*d0) % 5 -> 
  (if 1 then b else b ->0
   if 2 then c else c ->0
   if 3 then d else d ->0
   if 4 then e else e ->0
  )
 )

のとき，
for given X (1<=X<=10**5).
exits (a,b,c,d,e,f \in [0...10**6]).
100*a + 101*b + 102*c + 103*d + 104*e + 105*f == X
は必ず成立する

'''

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

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

A1 = X % 100
count = 0
while A1 >= 5:
    count += 1
    A1 -= 5
while A1 >= 4:
    count += 1
    A1 -= 4
while A1 >= 3:
    count += 1
    A1 -= 3
while A1 >= 2:
    count += 1
    A1 -= 2
while A1 >= 1:
    count += 1
    A1 -= 1
if count <= X // 100:
    print('1')
else:
    print('0')

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

a, b = X//100, X%100

if -(-b//5) <= a:
    print("1")
else:
    print("0")

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

ldp=[0 for i in range(max(106,X+1))]

for i in range(100,106):
    ldp[i]=1
if X>=105:
    for i in range(106,X+1):
        if sum(ldp[i-105:i-99])>=1:
            ldp[i]=1

print(ldp[X])

Solution (Python):
x = int(input())
q = x // 100
print('1') if (x <= q*100 + q*5) 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())

dp = [False for _ in range(110000)]
dp[0] = True

price = [100, 101, 102, 103, 104, 105]

for i in range(X + 1):
    if dp[i]:
        for p in price:
            dp[i + p] = True

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

Solution (Python):
x=int(input())
if x>=2000:
    print(1)
else:
    ko=x//100
    hasu=x-ko*100
    if hasu>ko*5:
        print(0)
    else:
        print(1)

Solution (Python):
import sys
n = int(input())
if n<100:
  print(0)
  sys.exit()

a = n%100
if a==0:
  print(1)
  sys.exit()
b = n//100
if 5*b<a:
  print(0)
  sys.exit()
for i in range(b+1):
  for j in range(b-i+1):
    for k in range(b-i-j+1):
      for l in range(b-i-j-k+1):
        for m in range(b-i-j-k-l+1):
          if i+2*j+3*k+4*l+5*m==a:
            print(1)
            sys.exit()
print(0)

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

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

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

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

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

c = X//100

if (c*100 <= X) and (X <= c*105):
	print('1')
else:
	print('0')

Solution (Python):
from heapq import heappush, heappop
from collections import deque
import re
import math
import functools

def sRaw():
    return input().rstrip("\r")

def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))

INF = 1 << 29


def make1d_arr(n, val=INF):
    return [val for i in range(n)]


def make2d_arr(h, w, val=INF):
    return [[val for i in range(w)]for i in range(h)]


def gcd(a, b):
    if(b == 0):
        return a
    return gcd(b, a % b)


def BFord(n,es):
    v_cost = [INF]*n
    v_cost[0] = 0
    for v in range(n*2):
        for e in es:
            frm = e[0]
            to = e[1]
            if v_cost[to] > v_cost[frm]+e[2]:
                v_cost[to] = v_cost[frm]+e[2]
                if v >= n:
                    v_cost[to] = -INF
        if v == n-1:
            prev = v_cost[:]
    v_cost = [-INF if prev[idx]!=v_cost[idx] else v_cost[idx] for idx in range(n)]
    return v_cost
    
def ZAlgo(s):
    l = len(s)
    A = [0]*l
    i =1
    j =0
    A[0]=l
    while i<l:
        while i+j<l and s[j] == s[i+j]:
            j+=1
        if j==0:
            i+=1
            continue
        A[i]=j
        k=1
        while (i+k<l) and (k+A[k]<j):
            A[i+k] =A[k]
            k+=1
        i+=k
        j-=k
    return A


DIV = 998244353

def main():
    X = iRaw()
    dp = [0]*(X+1)
    dp[0] =1
    for x in range(100,X+1):
        for d in range(100,106):
            if dp[x-d]==1:
                dp[x] = 1
                break
    return dp[X]

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

Solution (Python):
import sys

x = input()

if len(x) < 3:
    print(0)
    sys.exit()

prefix = int(x[:-2])
suffix = int(x[-2:])

n = 0
for item in range(5, 0, -1):
    n += suffix // item
    suffix %= item

print(0 if n>prefix else 1)

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

import numpy as np

J = np.zeros(X+1, dtype="bool")

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

if J[X] == True:
    print("1")
else:
    print("0")

Solution (Python):
import sys
import itertools

x = int(input())

nums = [100, 101, 102, 103, 104, 105]
if x >= 2000:
	print(1)
else:
	for i in range(20):
		for balls in itertools.combinations_with_replacement(nums, i):
			if sum(balls) == x:
				print(1)
				sys.exit()	
	else:
		print(0)

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

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

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

Solution (Python):
def get_d_1(n):
    return n % 10


def get_d_2(n):
    return (n % 100) // 10


def solve(X):
    while X > 0:
        d_1 = get_d_1(X)
        d_2 = get_d_2(X)
        if d_2 == 0:
            if d_1 == 0:
                return 1
            else:
                if d_1 > 5:
                    X -= 105
                else:
                    X -= 100 + d_1
        else:
            X -= 105
    if X == 0:
        return 1
    else:
        return 0


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