Problem:
 Score: 300 points    Problem Statement  AtCoder Mart sells 1000000 of each of the six items below:   Riceballs, priced at 100 yen (the currency of Japan) each  Sandwiches, priced at 101 yen each  Cookies, priced at 102 yen each  Cakes, priced at 103 yen each  Candies, priced at 104 yen each  Computers, priced at 105 yen each   Takahashi wants to buy some of them that cost exactly X yen in total.
Determine whether this is possible. (Ignore consumption tax.)      Constraints   1 \leq X \leq 100000  X is an integer.         Input  Input is given from Standard Input in the following format:  X       Output  If it is possible to buy some set of items that cost exactly X yen in total, print 1 ; otherwise, print 0 .        Sample Input 1 615      Sample Output 1 1  For example, we can buy one of each kind of item, which will cost 100+101+102+103+104+105=615 yen in total.       Sample Input 2 217      Sample Output 2 0  No set of items costs 217 yen in total.

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

sum_list = []
for i in range(1,1000):
    for v in range(100*i,105*i+1):
        sum_list.append(v)
        
if X in sum_list:
    print(1)
else:
    print(0)

Solution (Python):
N = int(input())
F = int((N-N%100)/100)
L = N%100

if N > 2000:
    print(1)
elif F * 5 >= L:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
n = x//100 + 1
 
for i in range(n):
  for j in range(n):
     for k in range(n):
         for l in range(n):
             for m in range(n):
                 c = 100*i + 101*j + 102*k + 103*l + 104*m
                 if x >= c:
                    t = x-c
                
                    if t%105 == 0:
                        print(1)
                        exit()
                    
print(0)

Solution (Python):
X = input()

simo2 = X[-2:]
ue = X[:-2]

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

if int(simo2)%5 !=0:
    if int(simo2)//5 + 1 <= int(ue):
        print('1')
    else:
        print('0')
else:
    if int(simo2)//5 <= int(ue):
        print('1')
    else:
        print('0')

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

if x >= 4000:
    print(1)
else:
    found = False
    for i0 in range(x // 100 + 1):
        if found:
            break
        for i1 in range(x // 101 + 1):
            if found:
                break
            for i2 in range(x // 102 + 1):
                if found:
                    break
                for i3 in range(x // 103 + 1):
                    if found:
                        break
                    for i4 in range(x // 104 + 1):
                        p = x - (i0 * 100 + i1 * 101 + i2 * 102 + i3 * 103 + i4 * 104)
                        if p >= 0 and p % 105 == 0:
                            print(1)
                            found = True
                            break
    if not found:
        print(0)

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

X = int(input())

l = []
for i in range(1001):
    l.extend(list(range(i*100, 105*i+1)))


if X in l:
    print(1)
else:
    print(0)

Solution (Python):
import numpy as np
x=int(input())
if x<=99:
    print(0)
    exit()
elif x==100 or x==101 or x==102:
    print(1)
    exit()
a=[100,101,102,103,104,105]
m=[1000000]*6
dplist = np.ones((7,x+1))*(-1)
dplist[0,0] = 0
for i in range(6):
    for j in range(x+1):
        if dplist[i,j] >= 0:
            dplist[i+1,j] = m[i]
        elif dplist[i+1,j-a[i]]<= 0:
            dplist[i+1,j] = -1
        elif j - a[i] < 0:
            dplist[i+1,j] = -1
        else:
            dplist[i+1][j] = dplist[i+1,j-a[i]] -1

if dplist[6,x] >= 0:
    print(1)
else:
    print(0)

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

Solution (Python):
X = int(input())
last2 = int(str(X)[-2:])
XX_n = int((X - last2)/100)
n5 = int(last2/5)
n4 = int(last2%5/4)
n3 = int(last2%5%4/3)
n2 = int(last2%5%4%3/2)
n1 = int(last2%5%4%3%2)
if XX_n>=n1+n2+n3+n4+n5:
    print(1)
else:
    print(0)

Solution (Python):
x = input()

ans = 0

if len(x) < 3:
    ans = 0

elif len(x) < 4:
    tmp1 = int(x[-2] + x[-1])
    tmp2 = int(x[0])
    if tmp2 * 5 >= tmp1:
        ans = 1

else:
    tmp1 = int(x[-2] + x[-1])
    tmp2 = int(x[-4] + x[-3])
    if tmp2 * 5 >= tmp1:
        ans = 1

print(ans)

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

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

X100over = X//100
X10 = X%100

X5 = X10//5
X1to4 = X10%5 !=0

if X5+X1to4 <= X100over:
    print(1)
else:
    print(0)

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

a=n//105
b=n//100

ans=False
for k in range(a,b+1):
    
    nokori=n-k*100
    
    lis=[5,4,3,2,1]
    tukai=0
    for a in lis:
        kau=nokori//a
        tukai+=kau
        nokori-=kau*a
    
    if(tukai<=k):
        ans=True

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

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

f = n / 100
m = n % 100

done = False
ans = -1

if f * 5 >= m:
    ans = 1
else:
    ans = 0

print ans

Solution (Python):

import math
X = int(input())
c = 0
x2 = X%100
for i in range(100000):
  x = 0
  if x2/5 >= 1 :
    x = math.floor(x2/5)
    x2 -= 5*x
  elif x2 / 4 >= 1 :
    x = math.floor(x2/4)
    x2 -= 4*x
  elif x2 / 3 >= 1 :
    x = math.floor(x2/3)
    x2 -= 3*x
  elif x2 / 2 >= 1 :
    x = math.floor(x2/2)
    x2 -= 2*x
  elif x2 / 1 == 1 :
    x = math.floor(x2/1)
    x2 -= 1*x
  c += x
  if x2 == 0:
    break
if X > c*100:
  print("1")
else :
  print("0")

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

q = int(x/100)
r = x%100

if x >= 2000:
	print(1)
elif r <= q*5:
	print(1)
else:
	print(0)

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

Solution (Python):
X = int(input())
ans = 0
r = X%100
cnt = 0

for i in range(5,0,-1):
    cnt += r//i
    r %= i
    if r == 0 and cnt <= X//100:
        ans = 1
        break

print(ans)

Solution (Python):
import numpy as np
A = int(input())

if A >= 3000:
    print(1)
else:
    a = [100,101,102,103,104,105]
    N = A//100
    dp = np.array([np.array([0 for i in range(A+1)]) for j in range(N+1)])
    dp[0][0] = 1

    for i in range(N):
        for j in np.where(dp[i] == 1)[0]:
        
           
            dp[i+1][j+100:j+106] = 1
    print(dp[N][A])

Solution (Python):

X = int(input())

def dfs(i, sum):
  if sum > X:
    return False
  if i==6:
    return sum == X
  val = 100 + i
  for j in range((X-sum)//val + 1):
    if dfs(i+1, sum + val * j):
      return True
  return False

if dfs(0, 0):
  print(1)
else:
  print(0)

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

ints = [5, 4, 3, 2, 1]
flag = False
if X >= 100:
  two_pieces = X % 100
  other_pieces = (X - two_pieces) / 100
  
  for i in ints:
    num_include = int(two_pieces / i)
    if num_include > 0 and num_include <= other_pieces:
        two_pieces -= i * num_include  
        other_pieces -= num_include
    if two_pieces == 0:
        flag = True
        break
    if other_pieces == 0: 
        break
  
print(int(flag))

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

XX = X%100
A = []
for i in range(20):
  for j in range(25):
    for k in range(100):
      for l in range(50):
        if i*5+j*4+k*3+l*2 <= XX:
          A.append((XX-(i*5+j*4+k*3+l*2),l,k,j,i))

for a,b,c,d,e in A:
  if a*101+b*102+c*103+d*104+e*105 <= X:
    print(1)
    exit()
print(0)

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

cnt = 0
for i in range(5):
    cnt += ama // (5-i)
    ama = ama % (5-i)

if cnt > has:
    print(0)
else:
    print(1)

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

Solution (Python):
s=str(input())
if int(s) < 100:
    print(0)
else:
    x = int(s[-2:])
    a,b = divmod(x,5)
    k = a + (1 if b else 0)
    if k * 100 <= int(s) - x:
        print(1)
    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

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd

def lcm(n,m):
    return int(n*m/gcd(n,m))

import re
import array
import copy
import functools
import operator

import collections
import itertools
import bisect
import heapq


from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace

from queue import PriorityQueue as pq

def reduce(p, q):
    common = fractions.gcd(p, q)
    return (p//common , q//common )



import random
import traceback

def main():
    x = int(input().strip())
    x_left=x%100                
    x_d3above=x//100            

    x_d1 = x_left % 10              
    x_d2 = x_left //10              

    sideEffect=0
    if x_d1==1:
        sideEffect+=100
    elif x_d1==2:
        sideEffect+=100
    elif x_d1==3:
        sideEffect+=100
    elif x_d1==4:
        sideEffect+=100
    elif x_d1==5:
        sideEffect+=100
    elif x_d1==6:
        sideEffect+=200
    elif x_d1==7:
        sideEffect+=200
    elif x_d1==8:
        sideEffect+=200
    elif x_d1==9:
        sideEffect+=200
    elif x_d1==0:
        pass
    else:
        eprint(x_d1)
        try:
            raise Exception
        except:
            traceback.print_exc("error!")

    if x_d2==1:
        sideEffect+=200
    elif x_d2==2:
        sideEffect+=400
    elif x_d2==3:
        sideEffect+=600
    elif x_d2==4:
        sideEffect+=800
    elif x_d2==5:
        sideEffect+=1000
    elif x_d2==6:
        sideEffect+=1200
    elif x_d2==7:
        sideEffect+=1400
    elif x_d2==8:
        sideEffect+=1600
    elif x_d2==9:
        sideEffect+=1800
    elif x_d2==0:
        pass
    else:
        eprint(x_d2)
        try:
            raise Exception
        except:
            traceback.print_exc()

    if (x//100)*100 < sideEffect:
        print(0)
    else:
        print(1)
        
    
    return

if __name__ == '__main__':
    main()

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

Data = [0]*(X+1)
Data[0] = 1

for c in range(100,106):
    for i in range(X+1):
        if Data[i] == 1:
            n = 1
            while c*n + i <= X:
                Data[c*n+i] = 1
                n+=1
if Data[X] == 1:
    print(1)
else:
    print(0)

Solution (Python):
import sys
x=(input())
ls = [101,102,103,104,105]
if int(x) < 100:
    print(0)
else:
    t = int(x[:-2])
    x = int(x)
    c = 0
    while True:
        if x <= 100:
            break
        x -=105
        c += 1

    if x+105 in ls:
        print(1)
    elif c == t:
        print(0)
    else:
        print(1)

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


temp = x % 100
x = x - 105 * int(temp / 5)
temp = x % 100
x = x - 104 * int(temp / 4)
temp = x % 100
x = x - 103 * int(temp / 3)
temp = x % 100
x = x - 102 * int(temp / 2)
temp = x % 100
x = x - 101 * int(temp / 1)

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

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

max_a = X // 100 + 1
max_n = max_a


def sum_X(n_list):
    x = sum([n * (100 + i) for i, n in enumerate(n_list)])
    return x


for a in range(max_a):
    if a > max_n:
        break
    for b in range(max_a):
        n = sum([a, b])
        if n > max_n:
            break
        for c in range(max_a):
            n = sum([a, b, c])
            if n > max_n:
                break
            for d in range(max_a):
                n = sum([a, b, c, d])
                if n > max_n:
                    break
                for e in range(max_a):
                    n = sum([a, b, c, d, e])
                    if n > max_n:
                        break
                    for f in range(max_a):
                        n = sum([a, b, c, d, e, f])
                        if n > max_n:
                            break
                        if X == sum_X([a, b, c, d, e, f]):
                            print(1)
                            exit()
print(0)

Solution (Python):
import math

N = int(input())

a=N%100
b=N//100

x=a//5
y=a%5

if y ==4:
  x+=2
elif y==3 or y==2 or y==1:
  x+=1


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

Solution (Python):
x = int(input())
if x >= 2000:
    print(1)
    exit(0)
else:
    for i in range(0,21):
        if 105*i + 1 <= x <= 99 + i*100:
            print(0)
            exit(0)
        else:
            pass
    print(1)

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

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

Solution (Python):
import math
X=int(input())
R=X%100
Q=X//100
if math.ceil(R/5)<=Q:
  print(1)
else:
  print(0)

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

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

elif 2000 <= x:
    print(1)
    exit(0)

n = int(x/100)

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

Solution (Python):
a = int(input())
num = a // 100
num2 = a//105
num3 = a%100
num4 = a%105
if 5*num >= num3:
	print(1)
else:
	print(0)

Solution (Python):
x=int(input())
items = [100,101,102,103,104,105]
list = [1]
if x == 100 or x == 101 or x == 102 or x == 103 or x == 104 or x == 105:
    print(1)
elif x <100:
    print(0)
else:
    for i in range(99):
        list.append(0)
    for i in range(6):
        list.append(1)
    for i in range(94):
        list.append(0)
    for i in range(200,x+1):
        for item in items:
            if list[i-item] == 1:
                list.append(1)
                break
        else:
            list.append(0)

    print(list[x])

Solution (Python):
from itertools import permutations, combinations,combinations_with_replacement,product

X =int(input())

s =str(X/100)

s_list =s.split('.')

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

for h in range(1,int(s_list[0])+1):
    for i in combinations_with_replacement(A,h):
        if sum(i) == int(s_list[1]):
            
            print("1")
            exit()

print("0")

Solution (Python):
N = int(input())
if N in [100,101,102,103,104,105]:
    print(1)
else:
    x = N%100
    xx = N//100
    y = x%5
    yy = x//5
    if y == 0 and xx-yy >= 0:
        print(1)
    elif  xx-yy>=1:
        print(1)
    else:
        print(0)

Solution (Python):
from itertools import combinations
import sys
"""
10の６条
ijklm
"""

X = int(input())
P = [1, 2, 3, 4, 5]

if 1 <= X <= 99:
    print("0")
    sys.exit(0)

a = X % 100
b = X // 100

if a == 0:
    print("1")
    sys.exit(0)

for i in range(20):
    for j in range(25):
        for k in range(34):
            for l in range(50):
                ans = 5 * i + 4 * j + 3 * k + 2 * l
                if a -ans <= b - (i + j + k + l) and a - ans >= 0:
                    print("1")
                    sys.exit(0)
print('0')

Solution (Python):
def solve():
    X = int(input())
    
    if X < 100:
        return 0
    
    upper1 = X // 100
    for p1 in range(0, 100 * upper1 + 1, 100):
        rest1 = X - p1
        if rest1 == 0:
            return 1
        upper2 = rest1 // 101
        for p2 in range(0, 101 * upper2 + 1, 101):
            rest2 = rest1 - p2
            if rest2 == 0:
                return 1
            upper3 = rest2 // 102
            for p3 in range(0, 102 * upper3 + 1, 102):
                rest3 = rest2 - p3
                if rest3 == 0:
                    return 1
                upper4 = rest3 // 103
                for p4 in range(0, 103 * upper4 + 1, 103):
                    rest4 = rest3 - p4
                    if rest4 == 0:
                        return 1
                    upper5 = rest4 // 104
                    for p5 in range(0, 104 * upper5 + 1, 104):
                        rest5 = rest4 - p5
                        if rest5 == 0:
                            return 1
                        upper6 = rest5 // 105
                        for p6 in range(0, 105 * upper6 + 1, 105):
                            rest6 = rest5 - p6
                            if rest6 == 0:
                                return 1
    else:
        return 0

print(solve())

Solution (Python):
x = input()
x2 = int(x[-2:])
x = int(x)
c = 0
for i in [5,4,3,2,1]:
    a, b = divmod(x2, i)
    c = c+a
    x2 = b
if x2 == 0:
    print(1 if 100*c < x else 0)
else:
    print(0)

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

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

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

a = x // 100
n = x % 100

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

Solution (Python):
n = input()

digit = len(n)
num = int(n)

min = 0
if digit == 3:
  min = int(n[0] + '00')
elif digit == 4:
  min = int(n[0] + n[1] + '00')
elif digit == 5:
  min = int(n[0] + n[1] + n[2] + '00')
elif digit == 6:
  min = int(n[0] + n[1] + n[2] + n[3] + '00')
else:
  min = 9999999999
  
max = min * 1.05
if num >= min and num <= max:
  print(1)
else:
  print(0)

Solution (Python):
def main():
    X = input()
    if(len(X)<3):
        print(0)
        return
    last = int(X[:len(X)-2])
    two = int(X[-2:])
    if two <= last*5:
        print(1)
    else:
        print(0)

if __name__=='__main__':
    main()

Solution (Python):
N=int(input())
ans=1
for i in range(21):
    if 105*i<N<100*(i+1):ans=0

print(ans)

Solution (Python):
X=input()
Xi=int(X)
if Xi>=100:
    if len(X)>=4 and Xi>=2000:
        print(1)
    else:
        if Xi<1000:
            print(1 if int(X[0])*5>=int(X[1:3]) else 0)
        else:
            print(1 if int(X[0:2])*5>=int(X[2:4]) else 0)
else:
    print(0)

Solution (Python):
X = int(input())
l = [100, 101, 102, 103, 104, 105]
N = X // 100
flag = 0

import itertools
for c in itertools.combinations_with_replacement(l, N):
    if sum(c) == X:
        flag = 1
        break

print(flag)

Solution (Python):
def main():
    
    
    X = int(input())
    rest = X
    flag = False
    for i in range(1000001):
        if rest == 0 or rest % 100 == 0:
            flag = True
            break
        elif rest < 100:
            flag = False
            break
        amari = rest % 100
        if amari >= 5:
            rest -= 105
        elif amari >= 4:
            rest -= 104
        elif amari >= 3:
            rest -= 103
        elif amari >= 2:
            rest -= 102
        elif amari >= 1:
            rest -= 101
    print(1 if flag else 0)


if __name__ == "__main__":
    main()

Solution (Python):
def func(X):
  max_X = int(X / 100)+1
  
  
  
  
  for x1 in range(max_X+1):
    for x2 in range(max_X+1):
      if x1 + x2 > max_X: break
      for x3 in range(max_X+1):
        if x1 + x2 + x3 > max_X: break
        for x4 in range(max_X+1):
          if x1 + x2 + x3 + x4 > max_X: break
          for x5 in range(max_X+1):
            if x1 + x2 + x3 + x4 + x5 > max_X: break
            for x6 in range(max_X+1):
              
              if x1*100 + x2*101 + x3*102 + x4*103 + x5*104 + x6*105 == X:
                print("1")
                return
  print("0")

X = int(input())
func(X)

Solution (Python):
X=int(input())
m=X%100
nmin=0
for i in range(5,0,-1):
    nmin+=m//i
    m=m-(m//i)*i
if nmin>(X//100):
    print("0")
else:
    print("1")

Solution (Python):
x = int(input())
dp = [0]*(x + 106)
dp[0] = 1
for i in range(x):
  if dp[i] == 1:
    dp[i + 100] =1
    dp[i + 101] =1
    dp[i + 102] =1
    dp[i + 103] =1
    dp[i + 104] =1
    dp[i + 105] =1
if dp[x] ==1:
  print(1)
else :
  print(0)

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

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

for item in lis:
    if X % item == 0:
        print(1)
        sys.exit()

if X >= 2000:
    print(1)
    sys.exit()

for x in range(1, 20):
    if 100 * x <= X <= 105 * x:
        print(1)
        sys.exit()
print(0)

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

Solution (Python):
'''import math
n = int(input())
x = n//1.08
o = math.floor(x*1.08)
s = math.floor((x+1)*1.08)
t = math.floor((x-1)*1.08)
if(o!=n and s!=n and t!=n):
    print(":(")
else:
    print(x)
'''
a = [0]*100001
a[0]=1
ls = [100,101,102,103,104,105]
for i in range(0,len(ls)):
    for j in range(ls[i],100001):
        a[j]+=a[j-ls[i]]
n=int(input())
if(a[n]):
    print(1)
else:
    print(0)

Solution (Python):
import sys
x = int(input())
n = x % 100
maxbuy = x // 100
ans = 0
if maxbuy > 99:
	print(1)
	sys.exit()
ans += n//5
n %= 5
ans += n//4
n %= 4
ans += n//3
n %= 3
ans += n//2
n %= 2
if n == 1:
	if ans+1 <= maxbuy:
		print(1)
	else:
		print(0)
else:
	if ans <= maxbuy:
		print(1)
	else:
		print(0)

Solution (Python):
X = int(input())
a = ( X // 105 ) + 1
small = a * 100
big = a * 105
if small <= X and X <= big:
    print(1)
elif X % 105 == 0:
    print(1)
else:
    print(0)

Solution (Python):


x=int(input())
n,mod=divmod(x,100)
print(1 if n*5>=mod else 0)

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

item = int(x / 105) + 2

for a in range(item) :
    for b in range(item - a) :
        for c in range(item - a - b) :
            for d in range(item - a - b - c) :
                for e in range(item - a - b - c - d) :
                    for f in range(item - a - b - c - d -e) :
                        if 100*a + 101*b  + 102*c + 103*d + 104*e + 105*f == x :
                            print("1")
                            sys.exit()
print("0")

Solution (Python):


x_str = input()
x = int(x_str)

if x < 100:
    print(0)
else:
    a = int(x_str[:-2])
    b = int(x_str[-2:])

    if a > b:
        print(1)
    else:
        count = 0
        d = b
        for i in range(5, 0, -1):
            c = d // i
            count += c
            if a < count:
                print(0)
                break
            if d % i == 0:
                print(1)
                break
            d = d - c*i

Solution (Python):
X = int(input())
ans = 0
tmp = str(X)
if len(tmp) > 2:
    upper = int(tmp[:-2])
    under = int(tmp[-2:])
    if upper * 5 < under:
        ans = 0
    else:
        ans = 1
else:
    ans = 0

print(ans)

Solution (Python):

N=int(input())

top   = N // 100
under = N % 100


for i in range(top):
    
    if(under == 0):
        break
    elif(under - 5 >= 0):
        under -= 5
    elif(under - 4 >= 0):
        under -= 4
    elif (under - 3 >= 0):
        under -= 3
    elif (under - 2 >= 0):
        under -= 2
    elif (under - 1 >= 0):
        under -= 1


if(under == 0):
    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())

prices = (100, 101, 102, 103, 104, 105)
M = (10000, 10000, 10000, 10000, 10000, 10000)


def restricted_part_sum(a, m, 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] = m[i]
            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 dp[N][A] >= 0


if restricted_part_sum(prices, M, X):
    print(1)
else:
    print(0)

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

X1 = X % 100

counter = 0
minusV = 5
while(X1 != 0):
    if(X1 - minusV >= 0):
        X1 = X1 - minusV
        counter += 1
    else:
        minusV -= 1

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

Solution (Python):
X = int(input())
f = True
for i in range(1,1000):
    if 100*i <= X <= 105*i:
        print(1)
        f = False
        break
if f:
    print(0)

Solution (Python):
import math

N=int(input())

X = math.floor(N / 100) + 1
ans = 0

for i in range(X):
  a = i * 100
  b = i * 105
  if a <= N and N <= b:
    ans = 1
    
print(ans)

Solution (Python):
X = input()

Xzero = X.zfill(len(X)+3)
Xzero = Xzero[::-1]

simo = Xzero[0:2]
simo = int(simo[::-1])
kami = Xzero[2:len(Xzero)]
kami = int(kami[::-1])

n = 0
for i in range(20):
    if(simo <= i*5):
        break
    n += 1

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

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

Solution (Python):
"""
n1 = int(input())*100
n2 = n1+99
x = n1//108+1
y = n2//108
print(x,y)
if x >=y:
	print(n2//108)
else:
	print(":(")

"""
x = int(input())
y = x//100
z = x%100
if y*5 >= z:
	print("1")
else:
	print("0")

Solution (Python):




x = int(input())


wk_v = x % 100
if wk_v <= int(int(x / 100) * 100 * 0.05):
    ans = 1
else:
    ans = 0


print(ans)

Solution (Python):
X = int(input())
q, mod = divmod(X, 100)

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

Solution (Python):
X = list(map(int, input().split()))[0]

a1 = int(X / 100)
a2 = int(X / 105)
if a1 == a2 and a2 < (X / 105):
    print(0)
else:
    print(1)

Solution (Python):
x = int(input())
if x >= 2100:
    print(1)
else:
    for i in range(1, 21):
        x -= 100
        if x < 0:
            break
        if x in range(0, i * 5 + 1):
            print(1)
            exit()
    print(0)

Solution (Python):
x = int(input())
x_1 = int(x / 100)
x_2 = x - x_1 * 100
sum = 0
for i in range(x_1):
    sum += 5
if sum >= x_2:
    print(1)
else:
    print(0)

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

Solution (Python):
import sys

X = int(input())
tmp1 = X // 100
tmp2 = X % 100
ans = 1

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

for i in range(5, 0, -1):
    t1 = tmp2 // i
    t2 = tmp2 % i
    tmp2 = t2
    tmp1 -= t1
    if tmp1 < 0:
        ans = 0
        break

if t2 != 0:
    ans = 0

print(ans)

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

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

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

a = x // 100
b = x - 100*a

c = (b+4)//5

if c <= a:
    print(1)
else:
    print(0)

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

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

xx = int(str(X)[-2:])

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

n = -(-xx//5)

if X > n * 100:
    print('1')
else:
    print('0')

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

items = list(range(100, 106))
MAP = [100000000] * 100001
MAP[0] = 0
PRICE_MAX = 100000

for price in items:
    for i in range(len(MAP)):
        if MAP[i] < PRICE_MAX:
            new_price = min([i + price, PRICE_MAX])
            MAP[new_price] = 1
if MAP[X] < PRICE_MAX:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
ans=0
if x>=10**4:
  ans=1
elif x<100:
  ans=0
else:
  y=x%100
  for i in range(1,21):
    if (y//(5*i)==0 or y==5*i) and x>=100*i:
      ans=1
print(ans)

Solution (Python):

X = int(input())
val = X % 100
num = X // 100

n1 = val // 5
n2 = val % 5

if(n2 == 0):
  num2 = n1
else:
  num2 = n1 + 1

if(num >= num2):
  print('1')
else:
  print('0')

Solution (Python):
inf = float("inf")
x = int(input())
if (x - x // 100 * 100) % 5 == 0:
    a = x // 100 >= (x - x // 100 * 100) // 5
else:
    a = x // 100 >= (x - x // 100 * 100) // 5 + 1
print(int(a))

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

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

target = x % 100
maximum = x // 100

if maximum*5 >= target:
    ans = 1
else:
    ans = 0

print(ans)

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

coin_num = N // 100 + 1
X = N % 100

for i in range(coin_num):
  for j in range(coin_num):
    for k in range(coin_num):
      for l in range(coin_num):
        for m in range(coin_num):
          if i+j+k+l+m <= coin_num-1:
            total = 1*i + 2*j + 3*k + 4*l + 5*m
            
            if total == X:
              print(1)
              exit()
            
print(0)

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

P = int(N//100)
Q = N%100

flag = 0

while N > 0:
  P = int(N//100)
  Q = N%100
  
  if(Q <= P*5):
    print(1)
    flag  = 1
    break
  else:
    N -= 2100

if(flag == 0):
  print(0)

Solution (Python):
x = int(input())
n = x // 100 + 10
for i1 in range(n+1):
  for i2 in range(n+1-i1+1):
    for i3 in range(n+1-i1-i2+1):
      for i4 in range(n+1-i1-i2-i3+1):
        for i5 in range(n+1-i1-i2-i3-i4+1):
          for i6 in range(n+1-i1-i2-i3-i4-i5+1):
            if 100*i1+101*i2+102*i3+103*i4+104*i5+105*i6 == x:
              if i1<=1000000 and i2<=1000000 and i3<=1000000 and i4<=1000000 and i5<=1000000 and i6<=1000000:
                print(1)
                exit()
print(0)

Solution (Python):
X = int(input())
m = [0,0]
flg = 0
m[0] = int(X/100)
m[1] = int(X/105)
while m[0] >= m[1]:
    if X >= int(m[1] * 100) and X <=int(m[1] *105):
        flg = 1
        break
    else:
        m[1] += 1

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

Solution (Python):

x = int(input())

s = x // 100
r = x % 100

print(1 if s * 5 >= r else 0)

Solution (Python):
X = int(input())
X_MOD = X % 100
X_DIV = X // 100

import sys
sys.setrecursionlimit(2000)
def dfs(sum_x, cnt_x, num):
    if cnt_x > X_DIV:
        return False
    if sum_x == X_MOD:
        return True

    if num == 1:
        return dfs(sum_x+1, cnt_x+1, 1) or dfs(sum_x+1, cnt_x+2, 2) or dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 2:
        return dfs(sum_x+1, cnt_x+2, 2) or dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 3:
        return dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 4:
        return dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 5:
        return dfs(sum_x+5, cnt_x+1, 5)
    

ans = int(dfs(0,0,1))
print(ans)

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

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

a = X // 100

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

Solution (Python):
x = str(input())
lx = len(x)
num = lx - 2
if int(x) >= 100:
    head = int(x[:num])
    body = int(x[num:])
    up = head * 5
    ans = int(0)
    if body <= up:
        ans = 1
    else:
        ans = 0
else:
    ans = 0
print(ans)

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

Solution (Python):
input1 = int(input())
kosu = int(input1 / 100)
amari = input1 % 100


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

Solution (Python):
money = [0,1,2,3,4,5]
n = int(input())
p = 0
lm = n//100
need = n - (lm*100)
if n>=100:
    print(1 if lm*5>= need else 0)
else:
    print(0)

Solution (Python):
'''
　 ∧_,,∧    究極奥義「WAがACになーれ！！」
　（`・ω・)つ━☆・*。
　⊂　　 ノ 　　　・゜+.
　 し’´Ｊ　　*・ 
'''
import sys
input = sys.stdin.readline
x=int(input())
dp=[0]*(max(x+1,200))
dp[100]=1
dp[101]=1
dp[102]=1
dp[103]=1
dp[104]=1
dp[105]=1
if x<=199:
    print(dp[x])
    exit()
for i in range(200,x+1):
    if dp[i-100]==1 or dp[i-101]==1 or dp[i-102]==1 or dp[i-103]==1 or dp[i-104]==1 or dp[i-105]==1:
        dp[i]=1
print(dp[x])

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

A = X//100

if (X%100)//5 +(X%5!=0) > A:
	print(0)
else:
	print(1)

Solution (Python):

si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
x = ni()
dp = [False for i in range(100002)]


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

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

Solution (Python):
from math import floor
x = int(input())
items = floor(x / 100)
if (x - items*100) / 5 <= items:
  print(1)
else:
  print(0)