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 sys

def _i(): return int(sys.stdin.readline().strip())

n = _i()
nmin = n//100
mod = n%100
m = 0
for i in range(5,0,-1):
    num = mod // i
    m += num
    mod-= num*i

if nmin>=m: print(1)
else: print(0)

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

while X >= 0:
    a = X % 100
    b = X // 100
    if a == 0:
        print(1)
        exit()
    X -= 100
    X -= min(5, a)
print(0)

Solution (Python):
X = int(input())
if X < 100:
    print(0)
    exit()
A = X % 100
cnt = 0
cnt += (A // 5)
A %= 5
cnt += (A // 4)
A %= 4
cnt += (A // 3)
A %= 3
cnt += (A // 2)
A %= 2
cnt += (A // 1) 


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

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

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

a = [100, 101, 102, 103, 104, 105]
m = [1000000 for _ in range(6)]
dp = [-1 for _ in range(x+1)]

dp[0] = 0
for i in range(6):
    for j in range(x+1):
        if dp[j] >= 0:
            dp[j] = m[i]
        elif j < a[i] or dp[j-a[i]] <= 0:
            dp[j] = -1
        else:
            dp[j] = dp[j-a[i]]-1

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

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

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

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

onigiri_num = x // 100
sub = x % 100

if sub <= 5*onigiri_num:
  print(1)
else:
  print(0)

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

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

Solution (Python):
X = input()
if len(X) <= 2:
    print(0)
    exit()
a = int(X[:-2])
b = int(X[-2:])
if b <= a * 5:
    print(1)
else:
    print(0)

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

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

Solution (Python):
x = int(input())
dp = [0 for i in range(x+1)]
items = [100, 101, 102, 103, 104, 105]
for item in items:
    for i in range(item, x+1):
        if dp[i] < dp[i-item] + item:
            dp[i] = dp[i-item] + item

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

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



def solver(x: int):
    if x < 100:
        return 0
    n = x // 100
    m = x % 100
    for _ in range(n):
        if m > 5:
            m -= 5
        else:
            return 1

    if m == 0:
        return 1
    else:
        return 0


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


if __name__ == "__main__":
    main()

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

Solution (Python):
import itertools
n = input()
if len(n) <= 2:
    print(0)
    exit()


k = int(n[:len(n)-2])
l = int(n[len(n)-2:])

if l <= 5*k:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
cnt = X // 100
under = X - cnt * 100


if cnt * 5 >= under:
    print("1")
else:
    print("0")

Solution (Python):
N=int(input())  
sup=1000000
num=N//100
if 100*num<=N<=105*num and num<=sup:
  print(1)
else:
  print(0)

Solution (Python):
n = input()
if len(n) >= 3:
    num = int(n[0:-2])
    yen = int(n[-2::])
    if num * 5 >= yen:
        print(1)
    else:
        print(0)
else:
    print(0)

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

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

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

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

    if X < 100:
        ans = 0
    else:
        X = str(X)
        under2 = int(X[-2] + X[-1])
        X = int(X)
        if under2 <= 5:
            ans = 1
        else:
            cnt = 0
            while under2 > 5:
                under2 -= 5
                cnt += 1
            cnt += 1

            if X >= cnt * 100:
                ans = 1
            else:
                ans = 0
    
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())
count = 0
while X >= 100:
    X -= 100
    count += 1

if count * 5 >= X:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
n=x//100
hasu=x-n*100
ans=0
if hasu<=n*5:
  ans=1
print(ans)

Solution (Python):
x=int(input())
ko=x//100
ama=x%100

if ama>5*ko:
    print('0')
else:
    print('1')

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

x_ni=x%100

if x<100:
    print(0)
else:
    x_go=x_ni//5
    if x_ni%5==0:
        hituyou=x_go
    else:
        hituyou=x_go+1
    if x//100>=hituyou:
        print(1)
    else:
        print(0)

Solution (Python):
import math

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

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




if __name__ == "__main__":
    main()

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

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

Solution (Python):

N = int(input())

if N // 100 > N // 105:
    print(1)
elif N % 105 == 0:
    print(1)
else:
    print(0)

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


def main():
    sc = Scan()
    X = sc.intarr()[0]

    a = X // 100
    b = X - (a*100)

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


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


def display(array):
    for a in range(len(array)):
        if len(array) - a != 1:
            print(array[a], end=' ')
        else:
            print(array[a])


main()

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

n = x // 100
r = x - 100*n

if (r > n*5):
    print(0)
else:
    print(1)

Solution (Python):
x = int(input())
dp = [0]*(x+20)
for i in range(100,x+10):
    if 100<=i and i<=105:
        dp[i] = 1
        continue

    for j in range(0,6):
        if dp[i-100-j]==1:
            dp[i] = 1
            break
        else:
            continue
print(dp[x])

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

Solution (Python):
import math
x = int(input())
num = x // 100
amari = x % 100

print(1 if math.ceil(amari/5) <= num else 0)

Solution (Python):

MOD = 10 ** 9 + 7

import math



def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def main():


    x=int(input())
    kaisu=x//100
    if x >=100:
        simo2=int(str(x)[-2]+str(x)[-1])
    else:
        simo2=0
 

    a=0
 
    if simo2>kaisu*5:
        a=0
    else:
        a=1
    if x<100:
        a=0
    print(a)



if __name__ == "__main__":
    main()

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 x in range(106,X+1):
  dp[x] = int(any(dp[x-105:x-99]))

print(dp[X])

Solution (Python):
x = int(input())
if 1 <= x and x <= 99:
  print(0)
  exit()
elif 106 <= x and x <= 199:
  print(0)
  exit()
elif 211 <= x and x <= 299:
  print(0)
  exit()
elif 316 <= x and x <= 399:
  print(0)
  exit()
elif 421 <= x and x <= 499:
  print(0)
  exit()
elif 526 <= x and x <= 599:
  print(0)
  exit()
elif 631 <= x and x <= 699:
  print(0)
  exit()
elif 736 <= x and x <= 799:
  print(0)
  exit()
elif 841 <= x and x <= 899:
  print(0)
  exit()
elif 946 <= x and x <= 999:
  print(0)
  exit()
elif 1051 <= x and x <= 1099:
  print(0)
  exit()
elif 1156 <= x and x <= 1199:
  print(0)
  exit()
elif 1261 <= x and x <= 1299:
  print(0)
  exit()
elif 1366 <= x and x <= 1399:
  print(0)
  exit()
elif 1471 <= x and x <= 1499:
  print(0)
  exit()
elif 1576 <= x and x <= 1599:
  print(0)
  exit()
elif 1681 <= x and x <= 1699:
  print(0)
  exit()
elif 1786 <= x and x <= 1799:
  print(0)
  exit()
elif 1891 <= x and x <= 1899:
  print(0)
  exit()
elif 1996 <= x and x <= 1999:
  print(0)
  exit()
else:
  print(1)
  exit()

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

def calc(x):
    if x < 100:
        return 0
    mod = x % 100
    max_cnt = x // 100
    if math.ceil(mod/5) <= max_cnt:
        return 1
    return 0

print(calc(X))

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

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

a = x%100
b = x//100

m = math.ceil(a/5.0)

if b < m:
    print(0)
else:
    print(1)

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

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

for i in range(5,0,-1):
  tmp_n = x//i
  n -= tmp_n
  x -= tmp_n*i

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

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

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

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

n = X // 100
a = X % 100

if n == 0:
    print('0')
    exit()

for i in range(5, 0, -1):
    ni = a // i
    ai = a % i
    if ni > n:
        print('0')
        break
    n -= ni
    a = ai
    if a == 0:
        print(1)
        break

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

s = x//100

t = s*5

res = x - 100*s

if res <= t:
  print(1)
else:
  print(0)

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

l2 = X % 100
h = X // 100

n = 0
if l2 > 5:
    k = l2 // 5
    n += k
    l2 %= 5
if l2 > 0:
    n += 1

if h >= n:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
N = X // 100
M = X % 100
ans = 0
for i in range(5, 0, -1):
    ans += M // i
    M %= i
if ans <= N:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
n = X // 100
N = X // 105
mX = n * 100
MX = n * 100 + 5 * n

if mX <= X <= MX:
    print(1)
else:
    print(0)

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

a = X // 100
b = X % 100

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

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

upp = x // 100
rem = x % 100

n5  = rem // 5
rem = rem % 5

n4  = rem // 4
rem = rem % 4

n3  = rem // 3
rem = rem % 3

n2  = rem // 2
rem = rem % 2

n1  = rem

sumn = n1 + n2 + n3 + n4 + n5

if upp >= sumn:
  print('1')
else:
  print('0')

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

X = int(input())
if X>=2000:
    print(1)
else:
    a = X//100
    b = X%100
    c = a*5
    if b>c:
        print(0)
    else:
        print(1)

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

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

right=n//100
left=n//105-1

while left<=right:

    middle=(left+right)//2
    
    if 100*middle<=n and n<=105*middle:
        print(1)
        exit()
    elif n<100*middle:
        right=middle
    else:
        left=middle+1
print(0)

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

if not a%100 or not a%105:
    print(1)
elif int(tmp01) == int(tmp02):
    print(0)
else:
    print(1)

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

if x >= 2100:
    print(1)
else:
    _a = x//100
    if _a*100 <= x <= _a*105:
        print(1)
    else:
        print(0)

Solution (Python):
X = int(input())
d100 = X // 100
Xm = X % 100

for y2 in range(0, 51):
    for y3 in range(0, 34):
        for y4 in range(0, 26):
            for y5 in range(0, 21):
                if y2 + y3 + y4 + y5 > d100:
                    continue

                y1 = Xm - ((2 * y2) + (3 * y3) + (4 * y4) + (5 * y5))
                if y1 < 0:
                    continue

                if 101 * y1 + 102 * y2 + 103 * y3 + 104 * y4 + 105 * y5 > X:
                    continue

                if (X - (101 * y1 + 102 * y2 + 103 * y3 + 104 * y4 + 105 * y5)) % 100 == 0:
                    print(1)
                    exit()

print(0)

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

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

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

Solution (Python):

def main():
    X = int(input())
    A = [False]*(110000)
    A[100] = True
    A[101] = True
    A[102] = True
    A[103] = True
    A[104] = True
    A[105] = True
    for i in range(100,X+1):
        if A[i]:
            A[i+100] = True
            A[i+101] = True
            A[i+102] = True
            A[i+103] = True
            A[i+104] = True
            A[i+105] = True
    if A[X]:
        print(1)
    else:
        print(0)
    return 

main()

Solution (Python):
x = int(input())
a = x % 100
a5 = a // 5
x5 = a - 5*a5
a4 = x5 // 4
x4 = x5 - 4*a4
a3 = x4 // 3
x3 = x4 - 3*a3
a2 = x3 // 2
x2 = x3 - 2*a2
a1 = x2 // 1
x1 = x2 - 4*a1
aaa = a1 + a2 + a3 + a4 + a5
xxx = (x - a) // 100
if xxx < aaa:
  print(0)
else:
  print(1)

Solution (Python):
x = int(input())
rem = x%100
flag = False
while x > 0:
  if rem >= 5:
    rem -= 5
    x -= 105
  elif rem == 4:
    rem -= 4
    x -= 104
  elif rem == 3:
    rem -= 3
    x -= 103
  elif rem == 2:
    rem -= 2
    x -= 102
  elif rem == 1:
    rem -= 1
    x -= 101
  else:
    x -= 100
if x == 0:
  flag = True
if flag:
  print('1')
else:
  print('0')

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

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

kosu = x//100
amari = x%100

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

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

s = 0
for i in range(n):
    s += min(rem - s, 5)
    if s == rem:
        print("1")
        exit()
print("0")

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

Solution (Python):


import math
import itertools


X = int(input())




if math.floor(X/100)*5 >= X%100 :
  print (1)
else :
  print (0)

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

x = int(input())

two_bit = x%100
five = two_bit//5
two_bit-= 5*five
if two_bit==0:
    amari = 0
else:
    amari = 1
if (five+amari) <= x//100:
    print(1)
else:
    print(0)

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

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

Solution (Python):


x=int(input())
dp=[False for i in range(x+1)]
dp[0]=True

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

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

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

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

r = n%100
h = (n-r)//100

print((r<=(h*5))*1)

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

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


last2 = int(X[len(X)-2::])


pc = last2//5
last2 = last2 % 5
candy = last2//4
last2 = last2 % 4
cake = last2//3
last2 = last2 % 3
cookie = last2//2
last2 = last2 % 2
sandwitch = last2//1
last2 = last2 % 1

X = int(X)-105*pc-104*candy-103*cake-102*cookie-101*sandwitch

if X%100==0 and X>=0:
  print(1)
else:
  print(0)

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

n1 = x // 100
n2 = x % 100

if 5 * n1 >= n2:
    print(1)
else:
    print(0)

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

num = X // 100

if num * 5 < X - num * 100:
	print(0)
else:
	print(1)

Solution (Python):

x = int(input())
min_need = 0
tmp = x % 100
min_need += tmp // 5
if tmp % 5:
    min_need += 1

if min_need * 100 < x:
    print(1)
else:
    print(0)

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

Y = X // 100
Z = X % 100

if Y >= 20:
    ans = 1
else:
    if Z % 5 != 0:
        A = (Z // 5) + 1
    else:
        A = Z // 5

    if A <= Y:
        ans = 1
    else:
        ans = 0
print(ans)

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

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

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) 

def LI(): return list(map(int, sys.stdin.readline().split()))
X = int(input())
prices = [100,101,102,103,104,105]


dp = [0 for i in range(2002)]
for price in prices:
    dp[price] = 1
for i in range(len(dp)):
    for price in prices:
        if i > price and dp[i-price] == 1:
            dp[i] = 1

if X > 2000:
    print("1")
else:
    print(dp[X])

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

if(n%100==0):
    print(1)
elif(n%101==0):
    print(1)
elif(n%102==0):
    print(1)
elif(n%103==0):
    print(1)
elif(n%104==0):
    print(1)
elif(n%105==0):
    print(1)
else:
    tmp=n//100
    mod=n%100/5
    if(mod<tmp):
        print(1)
    else:
        print(0)

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    n = II()
    tmp = n // 100
    if n - tmp * 100 <= tmp * 5:
        print(1)
        return
    print(0)

if __name__ == '__main__':
    main()

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

Solution (Python):
import math

n = int(input())

k = math.floor(n/100)
l = n - 100*k
m = k*5

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

Solution (Python):

a = int(input())

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

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(10**9)
X = int(input())

ITEM = [100, 101, 102, 103, 104, 105]
def restricted_part_sum(a,A):
  
  N=len(a)
  dp=[[-1 for i in range(A+1)] for j in range(N+1)]
  dp[0][0]=0

  
  for i in range(N):
    for j in range(A+1):
      if dp[i][j]>=0:
          dp[i+1][j]=1000000
      elif j<a[i] or dp[i+1][j-a[i]]<=0:
          dp[i+1][j]=-1
      else:
          dp[i+1][j]=dp[i+1][j-a[i]]-1
  return int(dp[N][A]>=0)


ret = restricted_part_sum(ITEM, X)
print(ret)

Solution (Python):








x = int(input())

if x >= 2000:
    ans = 1
else:
    n = x // 100
    if x <= n * 105:
        ans = 1
    else:
        ans = 0

print(ans)

Solution (Python):
X = int(input())
hasuu = X % 100
product_count = X // 100


if product_count * 5 >= hasuu:
    print("1")
else:
    print("0")

Solution (Python):
from sys import stdin
from itertools import combinations_with_replacement

x = int(stdin.readline().rstrip())

li = [0,1,2,3,4,5]

kosuu = x//100
amari = x%100

if amari > kosuu*5:
    print(0)
else:
    print(1)

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

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

ans = 1
for N in range(1, 10001):
    X_min = 100 * N
    X_max = 105 * N
    
    if X_min <= X <= X_max: break
else:
    ans = 0

print(ans)

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

import sys
sys.setrecursionlimit(10 ** 9)

memo = [-1] * (N + 1)

def dfs(x):
    if x >= 0 and memo[x] != -1:
        return memo[x]
    ans = False
    if x == 0:
        memo[x] = 1
        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)
    memo[x] = 1 if ans else 0
    return ans
if dfs(N):
    print(1)
else:
    print(0)

Solution (Python):

N = int(input())

M = N//100
if (N>=100*M) and (N<= 105*M):
    print(1)
else:
    print(0)

Solution (Python):
X = input()

last2 = int(X[len(X)-2:])
try_num = int(X) //100

for i in range(try_num):
    if last2 > 5:
        last2 -= 5
    else:
        print(1)
        exit(0)
print(0)

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

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

if b == 0:
    print(1)
    exit()

for n in [5,4,3,2,1,0]:
    if a == 0:
        print(0)
        exit()

    tmp = b // n
    
    b -= min(a, tmp)*n
    a -= min(a, tmp)

    if b == 0:
        print(1)
        exit()

Solution (Python):

x = int(input())

price = x%100
num = x//100
num_list = [5,4,3,2,1]

result = 0
for i in num_list:
    result += price//i
    price %= i


if result <= num:
    ans = 1
else:
    ans = 0

print(ans)

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

Solution (Python):
import sys
input=sys.stdin.readline
x=int(input())
n=x%100
if n==0:
    print(1)
else:
    if x//100>(n-1)//5:
        print(1)
    else:
        print(0)

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

X_2 = int(X / 100)
X_2_rest = X % 100

X_3 = int(X_2_rest / 5)
X_3_rest = X % 5

if X_3_rest > 0:
    X_4 = 1
else:
    X_4 = 0

if X_2 >= (X_3 + X_4):
    print(1)
else:
    print(0)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 8)


def dp(x, memo={}):
    if x in memo:
        return memo[x]
    if x in products:
        return True
    elif x == 0:
        return True
    elif x < 0:
        return False
    res = any(dp(x - p, memo) for p in products)
    memo[x] = res
    return res


x = int(input())
products = {100, 101, 102, 103, 104, 105}
if dp(x):
    print('1')
else:
    print('0')

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

if (x - 1) // 105 != x // 100:
	print(1)
else:
	print(0)

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



Y = int(X // 100)
Xmod = X % 100


if Xmod <= 5*Y:
  print(1)
else:
  print(0)

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


if __name__ == '__main__':
    solve()

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

X = INT()

dp = [0] * (X+1)
dp[0] = 1
for i in range(X):
    for j in range(100, 106):
        if i+j > X:
            break
        dp[i+j] |= dp[i]
print(dp[X])

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

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

Solution (Python):
import sys
X = int(input())
M = int(X/100)
D = X % 100

if M >= 20:
  print(1)
  sys.exit()
else:
  for a in range (0,M+1):
    for b in range (0,M+1-a):
      for c in range (0,M+1-a-b):
        for d in range (0,M+1-a-b-c):
          for e in range (0,M+1-a-b-c-d):
            s = 1 * a + 2 * b + 3 * c + 4 * d + 5 * e
            if s == D:
              print(1)
              sys.exit()
print(0)

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

Solution (Python):


def main():
    x=int(input())
    dp=[0 for i in range(x+1000)]
    for i in range (100,106):
        dp[i]=1

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


 
if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())
A = X // 100
B = X % 100
Ans = 0

if B <= 5 * A:
  Ans = 1
else:
  Ans = 0

print(Ans)

Solution (Python):
x=int(input())
cnt=x//100
t=x%100
check=t//5
t%=5
if t==0:
    if check<=cnt:
        print(1)
    else:
        print(0)
else:
    if check+1<=cnt:
        print(1)
    else:
        print(0)

Solution (Python):
import sys

input = sys.stdin.readline

X = int(input())

ntmp = X//100
nmod = X%100

if 5*ntmp>=nmod:
	ans = '1'
else:
	ans = '0'

print(ans)

Solution (Python):
N=int(input())
a=0
for i in range(1000):
 if (i+1)<=N/100 and (i+1)>=N/105:
  a+=1
if a==0:
 print(0)
else:
 print(1)

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

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

Solution (Python):
x = int(input())
a = x // 100
b = x % 100
y = 5
c = []
while(b > 0 or y > 0):
    c.append(b // y)
    b = b % y
    y -= 1
print(int(sum(c) <= a))

Solution (Python):

import queue as qu

def resolve():
    X=int(input())
    dpt=[False for _ in range(X+1)]
    q= qu.Queue()
    q.put(0)
    while not q.empty():
        nom=q.get()
        if nom>X:
            continue
        if nom==X:
            print(1)
            return 0
        if dpt[nom]==True:
            continue
        dpt[nom]=True
        q.put(nom+100)
        q.put(nom+101)
        q.put(nom+102)
        q.put(nom+103)
        q.put(nom+104)
        q.put(nom+105)
    print(0)                        
if __name__ == "__main__":
    resolve()

Solution (Python):
if __name__ == '__main__':
    a = int(input())
    b = a // 100
    c = a % 100

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

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

f=0
for i in range(1,21):
    for j in range(100*i,105*i+1):
        if x ==j:
            f=1
if f==1:
    print(1)
elif x>=2100:
    print(1)
else:
    print(0)

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):
X=int(input())

bai100=X//100
hasuu=X%100

parts=0
plus=5

while hasuu>0:
    
  while hasuu>0:
    parts+=hasuu//plus
    hasuu%=plus
    plus-=1
    
    if plus==0:
      break

print((parts<=bai100)*1)

Solution (Python):
x = int(input())
c = [100, 101, 102, 103, 104, 105]
INF = float("inf")
 
dp = [INF]*(x+1)
dp[0] = 0
 
for i in range(len(c)):
    for j in range(x+1):
        if j - c[i] < 0:
            continue
        else:
            dp[j] = min(dp[j], dp[j - c[i]] + 1)
if dp[x] == INF:
    print(0)
else:
    print(1)

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

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

dp = [-1] * (X + 1)
a = [100, 101, 102, 103, 104, 105]
m = [1000000] * 6
dp[0] = 0
for i in range(6):
    for j in range(X + 1):
        if dp[j] >= 0:
            dp[j] = m[i]
        elif j < a[i] or dp[j - a[i]] <= 0:
            dp[j] = -1
        else:
            dp[j] = dp[j - a[i]] - 1
            
print(int(dp[-1] >= 0))

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

res = [False for i in range(x + 1)]
res[0] = True
for i in range(100, 106):
    if x < i:
        break
    res[i] = True

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

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

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

Solution (Python):
x = int(input())
ok = [False for _ in range(100001)]

ok[100] = True
ok[101] = True
ok[102] = True
ok[103] = True
ok[104] = True
ok[105] = True

for i in range(106, 100001):
    ok[i] = (
        ok[i-100] or ok[i-101]
        or ok[i - 102] or ok[i-103] or ok[i-104] or ok[i-105]
    )

print('1' if ok[x] else '0')

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

num = n//100
mod = n % 100


if num * 5 >= mod:
    print(1)
else:
    print(0)

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

items = [100 + i for i in range(6)]

def check(X):
	prices = [False for x in range(X)]
	prices[0] = True
	for item in items:
		while True:
			changed = False
			
			for i in range(X):
				if prices[i]:
					price = item + i
					if price == X:
						return True
					elif price < X and prices[price] == False:
						prices[price] = True
						changed = True
			
			if not changed:
				break
	return False

if check(X):
	print("1")
else:
	print("0")

Solution (Python):
output = 0
X = int(input())
sho = X//100
Y = (X-sho*100)/5
if sho>=Y:
    output = 1
print(output)

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

tmp = x // 100

tmp2 = x - tmp*100

if tmp2 <= tmp * 5:
    print(1)

else:
    print(0)

Solution (Python):
	
"""
AtCoder A
"""

import sys, math, random
import numpy as np








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 main():
    X=I()
    d=100
    u=105
    i=1
    while True:

        if X<d*i:
            print(0)
            exit()
        if X<=u*i and X>=d*i:
            print(1)
            exit()
        else:
            i+=1

if __name__ == "__main__":
    main()