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

if 100<=N<=105:
    print(1)
    sys.exit()

min_=N//105
max_= N//100 + 1

count=0
for m in range(min_,max_):
    X = N - 100*m
    for i in range(0,X+1):
        for j in range(0,(X-i)//2 +1):
            for k in range(0,(X-i-2*j)//3 +1):
                for l in range(0,(X-i-2*j-3*k)//4 +1):
                    count+=1
                    if count >= 5*10**7:
                        print(1)
                        sys.exit()
                    temp = (X-i-2*j-3*k-4*l)
                    if (temp % 5 == 0) and (m-i-j-k-l-temp//5>=0):
                        a=m-i-j-k-l-temp//5
                        t=temp // 5
                        print(1)
                        
                        sys.exit()
else:
    print(0)

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

while 1:
	tm=(str(x)[-2:])
	if int(tm) > 5:
		x-=105
	else:
		print("1")
		exit()
		
	if x<100:
		print("0")
		exit()

Solution (Python):

X = int(input())

n = X // 100
a = 100 * n
b = 105 * n

if a <= X <= b or X >= 2000:
    print(1)
else:
    print(0)

Solution (Python):


import sys
X = int(input())
l = [100, 101, 102, 103, 104, 105]
dp = [0] * 1000000

dp[0] = 1
for i in range(100001):
   
    if dp[i] == 1:
        for j in range(6):
            dp[i + l[j]] = 1

print(dp[X])

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

Solution (Python):
X=input()
if len(X)==1:
    s=int(X)
else:
    s=int(X[-1])+int(X[-2])*10
    

b=s//5
b_=s%5
c=b_//4
c_=b_%4
d=c_//3
d_=c_%3
e=d_//2
e_=d_%2
f=e_//1
f_=e_//1

sum=b+c+d+e+f
sum_=105*b+104*c+103*d+102*e+101*f

if sum_>int(X):
    print(0)
else:
    print(1)

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

q, r = divmod(X, 100)

if r == 0:
    print(1)
    quit()

cnt = 0
for i in reversed(range(1, 6)):
    a, r = divmod(r, i)
    cnt += a
    if r == 0:
        break

if cnt <= q:
    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())

n = x / 100
sum = 0

for i in range(int(n)):
   sum += 5


if x % 100 <= sum:
   print(1)
else:
   print(0)

Solution (Python):
x = int(input())
a = list(False for i in range(x + 1))
a[0] = True
for i in range(1, x + 1):
    for j in range(6):
        if (i - 100 - j) >= 0:
            if a[(i - 100 - j)]:
                a[i] = True
if a[x]:
    print(1)
else:
    print(0)

Solution (Python):
def fun(N,V):
    cnt = 0

    for i in range(5):
        cnt += V // (5-i)
        V = V % (5-i)
        if V == 0:
            break

    if cnt<=N and V==0:
        flag = False
        print(1)
    else:
        flag = True
    
    return flag

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

    flag = True
    N = X//100
    V = X-N*100

    while flag:
        if N >= V/5:
            flag = fun(N,V)
            N -= 1
            V += 100
        else:
            flag = False
            print(0)

if __name__=='__main__':
    main()

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

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

Solution (Python):
X = int(input())
y = X//100
a = list(range(y*100,y*105+1))
if X in a:
  print(1)
else:
  print(0)

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

x=n//100
y=n%100


seq = (1,2,3,4,5)
exists = False

for i in seq:
    sum = 0
    z = y%i
    
    if z == 0:
        sum = y//i
        
        
    else:
        sum = (y//i) + 1
        
    if sum <= x:
        print('1')
        exists =True
        break

if not exists:
    print('0')

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

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

a = X//100

Xlist = str(X)

import sys

if X <100:
    print(0)
    sys.exit()
    
if a*5+1 <= int(Xlist[-2] + Xlist[-1]) and int(Xlist[-2] + Xlist[-1]) <=99:
    print(0)
else:
    print(1)

Solution (Python):
import sys
x=int(input())
a=x%100
b=x-a
i=int(b/100)
sample_list = [1, 2, 3, 4, 5]

for j in reversed(sample_list):
  c=a//j
  a=a%j
  i=i-c
  if i<0:
    print(0)
    sys.exit()
  elif i==0:
    if a==0:
      print(1)
      sys.exit()
    else:
      print(0)
      sys.exit()
  elif i>0:
    if a==0:
      print(1)
      sys.exit()
print(0)

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

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

Solution (Python):



def solve(*args: str) -> str:
    x = int(args[0])
    dp = [0]*(x+200)
    dp[0] = 1
    for i in range(x):
        if not dp[i]:
            continue

        for k in range(6):
            dp[i+100+k] = 1

    return str(dp[x])


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Solution (Python):
menu_yen = [100, 101, 102, 103, 104, 105]
menu_ten_yen = [1, 2, 3, 4, 5]
amount_of_menu = [100000]*len(menu_yen)

N = int(input())
if N<100:
    print(0)
    exit(0)

s = str(N)
h = int("".join(s[:-2]))
t = int("".join(s[-2:]))
total = [0]*5
for i in range(101):
    total[0] = i
    if t<total[0]:
        continue
    for j in range(51):
        total[1]=2*j+total[0]
        if t<total[1]:
            continue
        for k in range(34):
            total[2]=3*k+total[1]
            if t<total[2]:
                continue
            for l in range(26):
                total[3]=4*l+total[2]
                if t<total[3]:
                    continue
                for m in range(21):
                    total[4]=5*m+total[3]
                    if t<total[4]:
                        continue
                    if t==total[4] and (i+j+k+l+m)<=h:
                        print(1)
                        exit(0)
print(0)

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

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

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

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

if X % 100 == 0:
    print(1)
    exit()

cnt = X // 100
zan = X % 100

if zan > cnt * 5:
    print(0)
else:
    print(1)

Solution (Python):
n = int(input())
a = n
l = n//100
n = n%100
pay,change = 0,0
for i in range(5,0,-1):
  pay+=(n//i)
  change+=(n%i)
  n=n%i
if pay <=l:
  print(1)
else:
  print(0)

Solution (Python):
print(1 if (lambda x: sum([i*100<=x and x<=i*105 for i in range(101010)]))(int(input())) else 0)

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

while X > 99:
    if str(X)[-1] >= "5" or str(X)[-2] != "0":
        X -= 105
    elif str(X)[-1] == "4":
        X -= 104
    elif str(X)[-1] == "3":
        X -= 103
    elif str(X)[-1] == "2":
        X -= 102
    elif str(X)[-1] == "1":
        X -= 101
    elif str(X)[-1] == "0":
        X -= 100

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

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

print(ans)

Solution (Python):
import sys

X = int(input())

x = X // 100
if x * 5 < (X -( X // 100 * 100)):
    print(0)
    sys.exit()

if (x + 5) // 5 <= x:
    print(1)

else:
    print(0)

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

max_val = x // 100
min_val = x // 105

if min_val * 100 <= x and x <= max_val * 105:
    ans =1
else:
    ans = 0

print(ans)

Solution (Python):
x = int(input())
if x < 100:
	print(0)
	exit()
a = x //100
"""
l = len(str(x))
y = str(x)
head = int(y[0])
"""
tail = x - a*100


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

Solution (Python):
from itertools import combinations_with_replacement
X = int(input())

S = [0, 1, 2, 3, 4, 5]
A = X // 100
B = X - (A * 100)
if A > B:
    print(1)
else:
    A_list = list(combinations_with_replacement(S, A))
    for i in A_list:
        if sum(i) == B:
            print(1)
            exit()
    else:
        print(0)

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


for a in range(N // 100 + 1):
  for b in range(N // 101 + 1):
    for c in range(N // 102 + 1):
      for d in range(N // 103 + 1):
        for e in range(N // 104 + 1):
          for f in range(N // 105 + 1):
            if a * 100 + b * 101 + c * 102 + d * 103 + e * 104 + f * 105 == N:
              print(1)
              exit()
print(0)

Solution (Python):


def is_possible(q, mod):

    for i in range((mod//5)+1):
        if 5 * i > mod:
            break
        for j in range((mod//4)+1):
            if (5 * i) + (4 * j) > mod:
                break
            for k in range((mod//3)+1):
                if (5 * i) + (4 * j) + (3 * k) > mod:
                    break
                for l in range((mod//2)+1):
                    if (q - (i + j + k + l)) > mod - ((5 * i) + (4 * j) + (3 * k) + (2 * l)):
                        return True
                    elif (5 * i) + (4 * j) + (3 * k) + (2 * l) > mod:
                        break

    return False


X = int(input())

for i in range(6):
    if X % (100+i) == 0:
        print(1)
        exit(0)

q, mod = divmod(X, 100)

if is_possible(q, mod):
    print(1)
else:
    print(0)

Solution (Python):
import math
import fractions
from functools import reduce

def loop1(i, k, ans):
  global arr, result
  for ai in range(int(math.floor(k/arr[i])+1)):
    if (i+1<len(arr)):
      loop1(i+1, k-arr[i]*ai, ans+[ai])
    else:
      if arr[i]*ai==k:
        result=ans+[ai]
        break
  return result

def gcd(*arr):
  return reduce(fractions.gcd, arr)

def loop2(i, k, ans):
  global arr, result
  if k%gcd(*arr[i:len(arr)])==0:
    for ai in range(int(math.floor(k/arr[i])+1)):
      if i+1<len(arr):
        loop2(i+1, k-arr[i]*ai, ans+[ai])
      else:
        result=(ans+[ai])
        break
  return result


arr=[100, 101, 102, 103, 104, 105]
k=int(input())
result=""
if k>=2200:
  print(1)
else:
  loop2(0, k, [])
  if result=="":
    print(0)
  else:
    print(1)

Solution (Python):
X=int(input())
N=0
if X<100:
    print("0")
elif X>=2000:
    print("1")
else:
    while N<21:
        res=X-100*N
        if res>5*N:
            count=0
            N+=1
            continue
        elif 0<=res and res<5*N+1:
            print('1')
            count=1
            break
        N+=1
    if count==0:
        print("0")

Solution (Python):
import itertools
import sys
X = int(input())
A = [i for i in range(100, 106)]
num = int(X/100)
if X < 100: print(0)
elif X > 105*num: print(0)
else:
    for comb in itertools.combinations_with_replacement(A, num):
        if X == sum(comb):
            print(1)
            sys.exit()
    print(0)

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

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

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

if X>=2100:
  print(1)
  flag=True
else:
  for i in range(0,22):
    for j in range(0,22-i):
      for k in range(0,22-i-j):
        for l in range(0,22-i-j-k):
          for m in range(0,22-i-j-k-l):
            for n in range(0,22-i-j-k-l-m):
              if 100*i+101*j+102*k+103*l+104*m+105*n==X:
                if flag==False:
                  print(1)
                  flag=True
                  break
              
if flag==False:
  print(0)

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

mod = [5,4,3,2,1]
while x % 100 != 0 and x > 100:
    xxx = int(str(x)[-2:])
    for m in mod:
        if xxx >= m:
            x -= (100+m)
            break
    
    
print(1) if x % 100 == 0 else print(0)

Solution (Python):
x = int(input())
f = (x%100)//5
ff = (x%100)%5
a = [0,101,102,103,104]
if 105*f+a[ff]<= x:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
if len(str(x)) < 3:
  print(0)
else:
  print("1" if x//100 >= x/105 else "0")

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

a = X%100
b = a//5

if b < X//100 or X%105==0 :print(1)
else:print(0)

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

Solution (Python):
x = int(input())
d3 = 0
d21 = 0
if x >99:
    d3 = int(str(x)[-3])
    d21 = int(str(x)[-2::])


if 1 <= x < 100:
    print(0)

elif x < 1000:
    if (d3 * 105) % 100 < d21:
        print(0)
    else:
        print(1)

elif 1000 <= x < 2000:
    if (d3 * 105) % 100 + 50 < d21:
        print(0)
    else:
        print(1)

else:
    print(1)

Solution (Python):

import sys


def solve(X: int):
    dp = [[-1]*(X+1) for _ in range(7)]
    price = [100,101,102,103,104,105]
    m = [10**5]*6

    for i in range(7):
        dp[i][0] = 10**5

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

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

    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 itertools
X = int(input())
price=[100,101,102,103,104,105]
num = int(X / 100)
state=False
for i in range(num,0,-1):
    for j in itertools.combinations_with_replacement(price, i):
        if sum(j) == X:
            print(1)
            state=True
            exit()
if state != True:
    print(0)

Solution (Python):
X = int(input())
print(1 if X % 105 == 0 or X % 100 == 0 or X // 105 + 1 <= X // 100 else 0)

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

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



dp = [int(i % mylist[0] == 0) for i in range(X + 1)]

for m in mylist[1:]:
    for i in range(m, X+1):
        dp[i] += dp[i-m]


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

Solution (Python):
import math

X = int(input())

if(X < 100):
    print(0)
    exit
else:
    if (int(str(X)[-2])*10 + int(str(X)[-1])*1) % 5 == 0:
        if math.floor((int(str(X)[-2])*10 + int(str(X)[-1])*1) / 5) > math.floor(X / 100):
            print(0)
        else:
            print(1)
    else:
        if math.floor((int(str(X)[-2])*10 + int(str(X)[-1])*1) / 5) + 1 > math.floor(X / 100):
            print(0)
        else:
            print(1)

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

last_two = X % 100
other = X - last_two

count = 0
flag = 0

for i in range(5, 0, -1):
    count += last_two // i
    last_two = last_two % i
    if last_two % i == 0:
        if count <= other // 100:
            flag = 1
            break
if flag == 1:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
memo=[0]*200000

for i in range(1,1000):
  temp=[1]*(5*i+1)
  memo[100*i:105*i+1]=temp
memo[100000]=1

if x<=100000:
  print(memo[x])
else:
  print(0)

Solution (Python):
def bag(x):
  max_num = x // 100
  print(int(max_num * 5 >= x % 100))
 
if __name__ == "__main__":
  import sys
  in_str = ''
  for line in sys.stdin:
    in_str += line
  n = [int(_) for _ in in_str.split()][0]
  bag(n)

Solution (Python):
import itertools

x = int(input())

if x < 100:
    print("0")
else:
    n = x // 100
    
    

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

    for balls in itertools.combinations_with_replacement(nums, n):
        
        if sum(balls) == x:
            print('1')
            break
    else:
        print('0')

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

Solution (Python):
X = int(input())
W = 100000 + 1
H = 6
S = [100, 101, 102, 103, 104, 105]

dp = [[-1] * W] * H

for i in range(H):
    for j in range(W):
        if j == S[i]:
            dp[i][j] = 1
        if j - S[i] >= 0 and dp[i][j - S[i]] == 1:
            dp[i][j] = 1
        if i - 1 >= 0 and dp[i - 1][j] == 1:
            dp[i][j] = 1
        if dp[i][j] == 1 and j + S[i] <= 100000:
            dp[i][j + S[i]] = 1

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

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

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

dp = [0 for i in range(100)]
for i in range(6):
  dp.append(1)

i = 106

while i <= x+5:
  if dp[i - 100] + dp[i - 101] + dp[i - 102] + dp[i - 103] + \
  dp[i - 104] + dp[i - 105] == 0:
    dp.append(0)
  else:
    dp.append(1)
  i = i + 1
  
print(dp[x])

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    X = int(input())

    goods = (100, 101, 102, 103, 104, 105)
    dp = [float('inf')] * (X + 1)
    dp[0] = 0
    for i in range(X + 1):
        for j in range(6):
            if i - goods[j] >= 0:
                dp[i] = min(dp[i], dp[i - goods[j]] + 1)
    if type(dp[X]) is int:
        print(1)
    else:
        print(0)


main()

Solution (Python):
x = int(input())
ls = [100,101,102,103,104,105]
for dv in ls:
    if x%dv == 0:
        print(1)
        exit()
lower = int(x/105)
upper = int(x/100)
if lower == upper:
    print(0)
else:
    print(1)

Solution (Python):
X = int(input())
N = X//100
mod100 = X%100
loop= min(N,100)
for a1 in range(loop):
    for a2 in range(loop-a1+1):
        for a3 in range(loop-(a1+a2)+1):
            for a4 in range(loop-(a1+a2+a3)+1):
                for a5 in range(loop-(a1+a2+a3+a4)+1):
                    if a1+2*a2+3*a3+4*a4+5*a5 == mod100:
                        print(1)
                        exit()
print(0)

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

err = 0

if X >= 2000:
    print("1")
    err = 1
else:
    for i in range(19):
        n = i + 1
        if X>= 100*n and X<= 100*n+5*n:
            print("1")
            err = 1
            break
if err == 0:
    print("0")

Solution (Python):



X = int(input())

flg = 0

for n in range(1, 1000):
    if 100*n <= X <= 100*n + 5*n:
        flg = 1
    else:
        pass

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

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

if B <= A *5:
    print(1)
else:
    print(0)

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

Solution (Python):
x = input()
xbc  = int(x[-2:])
xa   = int(x[0])
cost = xbc
cnt=0

for i in range(5,-1,-1):
    if((cost // i)>0):
        w = cost //i
        cost -= i*w
        cnt += w
    if(cost==0):
        break
if(int(x)<cnt*100):
    print("0")
else:
    print("1")

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

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





abcdef = int(2 * X // 205)
def1 = 2 * X - 205 * abcdef
f = def1 // 5
de = def1 % 5
e = de // 3
d = de % 3
if f + e + d <= abcdef:
    print(1)
    exit()


abcdef = math.ceil(2 * X / 205)
abc = 205 * abcdef - 2 * X
a = abc // 5
bc = abc % 5
b = bc // 3
c = bc % 3
if a + b + c <= abcdef:
    print(1)
    exit()

print(0)

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

if X < 100:
    ans = 0
else:
    a = str(X)
    a = int(a[:-2])
    b = X - a*100

    if a >= 20:
        ans = 1

    else:
        if a*5 >= b:
            ans = 1
        else:
            ans = 0

print(ans)

Solution (Python):
import math
x = int(input())
if x >=  2000:
    print(1)
elif x <= 99:
    print(0)
else:
    a = math.floor(x / 100)
    b = x % 100
    if b > 5*a:
        print(0)
    else:
        print(1)

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

Solution (Python):
line = input()

if int(line) >= 100:
    num = int(line[-2:])
    item_number = int(line[:-2])



    res_list = []
    a = 5
    while True:
        if num == 0:
            break
        for _ in range(num//a):
            res_list.append(a)

        num = num % a

        if 1<= num <= 4:
            res_list.append(num)
            break


    

    if len(res_list) > item_number:
        print(0)
    else:
        print(1)

else:
    print(0)

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

    if any((1 <= X <= 99,
           106 <= X <= 199,
           211 <= X <= 299,
           316 <= X <= 399,
           421 <= X <= 499,
           526 <= X <= 599,
           631 <= X <= 699,
           736 <= X <= 799,
           841 <= X <= 899,
           946 <= X <= 999,
           1051 <= X <= 1099,
           1156 <= X <= 1199,
           1261 <= X <= 1299,
           1366 <= X <= 1399,
           1471 <= X <= 1499,
           1576 <= X <= 1599,
           1681 <= X <= 1699,
           1786 <= X <= 1799,
           1891 <= X <= 1899,
           1996 <= X <= 1999)):
        return '0'
    return '1'

print(c_100_to_105())

Solution (Python):
n = int(input())
r = n
left = n//100
n = n%100
pay = 0
chance = 0
for i in range(5, 0,-1):
	pay+=(n//i)
	chance+=(n%i)
	n=n%i
if pay<=left:
	print(1)
else:
	print(0)

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

if x2==0:
  print('1')
elif X<100:
  print('0')
else:
  tmp=0
  for f in range(19,0,-1):
    if 5*f==x2:
      tmp=105*f
      break
    elif 5*f<x2:
      x2 -= 5*f
      tmp = 105*f + (100 + x2)
      break
      
  if tmp>X:
    print('0')
  else:
    print('1')

Solution (Python):
N = int(input())
N1 = N%100//5
N2 = 0
if N%100%5 == 0:
    N2 = 0
else:
    N2 = 1
S =N1+N2
if 100*S > N:
    print("0")
else:
    print("1")

Solution (Python):
x = int(input())
l = x // 100
if x >= 2000:
    print(1)
else:
    k = l % 20
    min = l*100
    max = l*100 + k*5
    if min <= x <= max:
        print(1)
    else:
        print(0)

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

s = n % 100
b = (n - s) // 100

if b * 5 < s:
    print(0)
else:
    print(1)

Solution (Python):

"""
oj dl https://atcoder.jp/contests/abc116/tasks/abc116_d -d test-d
oj test -d test-d -c "python abc116d.py"
oj test -d test-d -c "python abc116d.py" test-d/sample-3.in
"""
from collections import defaultdict
import sys
import math
from datetime import datetime
import re
import math

sys.setrecursionlimit(1000000)




























































def sol(n):
    dp = [[False] * (n+1) for _ in range(6)]
    P = [
        100, 
        101, 
        102, 
        103, 
        104, 
        105, 
    ]
    for i in range(len(P)):
        for j in range(n+1): 
            if j % P[i] == 0:
                dp[i][j] = True
            else:
                candidates = [False]
                if j - P[i] >= 0: candidates.append(dp[i][j-P[i]])
                if i - 1 >= 0: candidates.append(dp[i-1][j])
                dp[i][j] = any(candidates)
    
    
    return '1' if dp[5][n] else '0'


do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    
    
    return n


if not do_submit:
    S = input_parse("""
    615
    """)
    print(sol(S))

    S = input_parse("""
    217
    """)
    print(sol(S))

else:
    
    S = int(input())
    print(sol(S))

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

remain = x % 100
quotient = math.floor(x/100)

items = [100, 101, 102, 103, 104, 105]
n = 6

for moneys in itertools.combinations_with_replacement(items, quotient):
    if sum(moneys) == x:
        print(1)
        exit()
print(0)

Solution (Python):
import sys


		
def main():
	dd=[0]*100200
	a = int(input())
	cc=[100,101,102,103,104,105]
	dd[0]=1
	for i in range(a+1):
		if i == a:
			return dd[i]
		if dd[i] == 1:
			for c in cc:
				dd[i+c] = 1
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
x=int(input())
p=x//100
q=x%100

for i in range(p):
    q-=5
if q<=0:
    print(1)
else:
    print(0)

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

cnt = (X - X % 100) // 100
d2 = X % 100


if d2 % 5 == 0:
    if d2 // 5 <= cnt:
        result = 1
    else:
        result = 0
else:
    if d2 // 5 + 1 <= cnt:
        result = 1
    else:
        result = 0
print(result)

Solution (Python):
x = int(input())
amari = x%100
tiket = x//100
ans = 0
i = 0
if amari == 0:
    ans = 1
while (tiket > 0 and i < 5):

  tiket -= amari//(5-i)
  amari = amari % (5-i)
  i += 1
  if (amari == 0 and tiket>=0):
    ans = 1
    break
print(ans)

Solution (Python):
from math import ceil
N = int(input())
if N < 100:
    print(0)
    exit()
t, s = str(N)[:-2], str(N)[-2:]
if int(t) >= ceil(int(s)/5):
    print(1)
else:
    print(0)

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

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

a = x%100

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

Solution (Python):
def main():

    x = int(input())
    x_amari = x%100

    x_100 = x//100
    
    

    x_1 = x_amari//1
    x_2 = x_amari//2
    x_3 = x_amari//3
    x_4 = x_amari//4
    x_5 = x_amari//5
    
    

    if x_100 >= (x_5+1) or x%105 == 0:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
x=int(input())
m=int(x%100)
n=int(x/100)
c=0
if n<m:
  for i in range(n+1):
    for j in range(n+1-i):
      for k in range(n+1-i-j):
        for s in range(n+1-i-j-k):
          if 1*i+2*j+3*k+4*s+5*(n-i-j-k-s)==m:
            c=1
            break
          
else:
   c=1
    
if c==1:
  print(1)
else:
  print(0)

Solution (Python):
import math
import sys


X = int(input())

minkosu = math.ceil(X/105)
maxkosu = math.floor(X/100)

for kosu in range(minkosu, maxkosu+1):
    if(X-100*kosu <= 5*kosu):
        print("1")
        sys.exit()

print("0")

Solution (Python):
import sys
x = input()
l = len(x)

if l == 6:
    print(1)
    sys.exit(0)
elif l <= 2:
    print(0)
    sys.exit(0)
else:
    top = int(x[0:l-2])
    left = int(x[l-2:])
    if top * 5 < left:
        print(0)
    else:
        print(1)

Solution (Python):
X= int(input())
x=int(X/100)+1


for a in range(x):
    cost0 = 0
    cost0 += 100 * a
    if cost0 > X:
        break
    if cost0 == X:
        print(1)
        exit()

    for b in range(x):
        cost1 = cost0 + 101 * b
        if cost1 > X:
            break
        if cost1 == X:
            print(1)
            exit()

        for c in range(x):
            cost2 = cost1 + 102 * c
            if cost2 > X:
                break
            if cost2 == X:
                print(1)
                exit()

            for d in range(x):
                cost3 = cost2 + 103 * d
                if cost3 > X:
                    break
                if cost3 == X:
                    print(1)
                    exit()

                for e in range(x):
                    cost4 = cost3 + 104 * e
                    if cost4 > X:
                        break
                    if cost4 == X:
                        print(1)
                        exit()

                    for f in range(x):
                        cost5 = cost4 + 105 * f
                        if cost5 > X:
                            break
                        if cost5 == X:
                            print(1)
                            exit()
print(0)

Solution (Python):
X = int(input())
divisions_100 = X//100
residuals = X%100
n_100 = 0
for i in range(1,6)[::-1]:
    n_100 += residuals // i
    residuals -= (residuals // i)*i
    if residuals % i == 0:
        break
if n_100 <= divisions_100:
    print(1)
else:
    print(0)

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

dp = [0 if i==0 else -1 for i in range(X + 1)]
N = 6
a = [i for i in range(100, 106)]
m = [capacity for i in range(N)]


for i in range(N):
    dp_tmp = []
    for j in range(X + 1):
        if (dp[j] >= 0):
            dp_next = m[i]
        elif ((j < a[i]) or (dp_tmp[j-a[i]] <= 0)):
            dp_next = -1
        else:
            dp_next = dp_tmp[j-a[i]] - 1
        dp_tmp.append(dp_next)
    dp = dp_tmp

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

Solution (Python):
X = int(input())
count = int(X / 100)
left = X % 100

if left == 0:
    print(1)
elif count * 5 < left:
    print(0)
elif count * 5 == left:
    print(1)
elif count * 5 > left:
    print(1)

Solution (Python):
X = float(input())
p = int(X/100) 
T=1 
F=0 
if p==0:
 print(F)

else:
 if X<=p*105:
  print(T)
 else:
  print(F)

Solution (Python):
X = int(input())
sinamono = [100, 101, 102, 103, 104, 105]
dp = [[False for _ in range(X+100)] for _ in range(len(sinamono)+1)]

dp[0][0] = True

for i in range(len(sinamono)):
    for j in range(X+10):
        if (j < sinamono[i]):
            dp[i + 1][j] = dp[i][j]
        else:
            dp[i + 1][j] = dp[i][j] or dp[i + 1][j - sinamono[i]]

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

Solution (Python):
x=int(input())
n=x//100
k=x%100
a=k//10
v=x%10
if v==0:
    b=0
elif v<=5:
    b=1
else:
    b=2
value=a*2+b
if n>=value:
    print(1)
else:
    print(0)

Solution (Python):
a = int(input())
l = [int(x) for x in list(str(a))]
n = int(l[(len(l)-2)]*10 + l[(len(l)-1)])
m = int((a - n)/100)

if a < 100:
  print(0)
else:
  while n > 5 and m > 0:
    n = n - 5
    m = m - 1
  if m == 0:
    print(0)
  else:
    print(1)

Solution (Python):
import math

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

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

if 103-X%103<=3*((X//105)+1):
    print(1)
elif X%103<=2*X//103:
    print(1)
else:
    print(0)

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

print(1) if x-cnt*105<=0 else print(0)

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

result = [ 0 for x in range(MAX)]
result[100] = 1
result[101] = 1
result[102] = 1
result[103] = 1
result[104] = 1
result[105] = 1

x = int(input())
for v in range(100, x+1):
    for p in prices:
        if result[v] or result[v-p]:
            result[v] = 1
            break
print(result[x])

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

N = int(input())




for x in range(1, N+1):
    if 100.0 <= N/x <= 105.0:
        print(1)
        exit(0)
print(0)