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

if len(x)>=3:
  if int(x[-2:])%5==0:
    if int(x[:-2])-int(x[-2:])//5>=0:
      print(1)
    else:
      print(0)
  elif int(x[-2:])%4==0:
    if int(x[:-2])-int(x[-2:])//4>=0:
      print(1)
    else:
      print(0)
  elif int(x[-2:])%3==0:
    if int(x[:-2])-int(x[-2:])//3>=0:
      print(1)
    else:
      print(0)
  elif int(x[-2:])%2==0:
    if int(x[:-2])-int(x[-2:])//2>=0:
      print(1)
    else:
      print(0)
  elif int(x[-2:])%1==0:
    if int(x[:-2])-int(x[-2:])//1>=0:
      print(1)
    else:
      print(0)
  else:
    print(0)
else:
  print(0)

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

def main():
    x = int(readline())
    dp = [0]*(10**6)
    dp[0] = 1
    for i in range(10**5+1):
        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
    print(dp[x])

if __name__ == "__main__":
    main()

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

Solution (Python):

x=int(input())
ans=list(str(x))
a=int(ans[len(ans)-2]+ans[len(ans)-1])
if 5*(x//100)>=a:
	print(1)
else:
	print(0)

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

a = X // 100
b = X % 100

count = b // 5

if b % 5 != 0:
    count += 1

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

Solution (Python):

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

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

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

q = int(x/100)

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

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

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

Solution (Python):
def combinations(coin, total):
    dp = [int(i % coin[0] == 0) for i in range(total + 1)]
    for coin in coin[1:]:
        for i in range(coin, total+1):
            dp[i] += dp[i-coin]
    return dp[-1]

coin = [100, 101, 102,103,104,105]
total = int(input())
if total>615*1e6:
    print("0")
else:
    if combinations(coin,total)==0:
        print("0")
    else:
        print("1")

Solution (Python):
X = int(input())
total = 0
a = X%100
total += a//5
a = a%5
total += a//4
a = a%4
total += a//3
a = a%3
total += a//2
a = a%2
total += a
if(total*100>X):
    print(0)
else:
    print(1)

Solution (Python):
X = int(input())
if X>=2000:
  print(1)

elif X<100:
  print(0)
  
else:
  fil = ((X//100)*10)//2
  judge = X%100
  if judge<=fil:
    print(1)
  else:
    print(0)

Solution (Python):
import sys

x = input()
X = int(x)

if X < 100:
	print(0)
	sys.exit()
elif X >= 100 and X <= 105:
	print(1)
	sys.exit()
elif X % 105 == 0:
	print(1)
	sys.exit()

x1 = int(x[:-2])
x2 = int(x[-2:])

c = int(x2 // 5) + 1

if x1 >= c:
	print(1)
else:
	print(0)

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

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

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

Solution (Python):
p = int(input())
n = p%100
m = p//100
flag = 0
while n!=0:
  if n>=5:
    n-=5
    flag+=1
  elif n>=4:
    n-=4
    flag+=1
  elif n>=3:
    n-=3
    flag+=1
  elif n>=2:
    n-=2
    flag+=1
  elif n>=1:
    n-=1
    flag+=1
if flag<=m:
  print(1)
else:
  print(0)

Solution (Python):
x = int(input())
while(x>=0):
    if x%100==0:
        print("1")
        break
    elif x<100:
        print("0")
        break
    elif x%100>=5:
        x -= 105
        continue
    else:
        x-=(x%100)+100
        continue

Solution (Python):
import sys
input = sys.stdin.readline
x = int(input())
if x < 100:
    print(0)
    exit()
t = x % 100
c = x // 100
if c >= 20:
    print(1)
    exit()
if t / c > 5:
    print(0)
else:
    print(1)

Solution (Python):
x=int(input())
X=str(x)
if x<100:
  print(0)
else:
  m=int(X[len(X)-2:len(X)])
  n=0
  for a in range(1,6):
    while m>=6-a:
      n+=1
      m-=6-a
  if int(X[0:len(X)-2])>=n:
    print(1)
  else:
    print(0)

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

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

min = int(x / 100)

tmp = 100 * min
ans = x - tmp
hm = 5 * min


if(ans == 0):
  print(1)
  exit()
else:
  if(ans <= hm):
    print(1)
    exit()
print(0)

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

a = X // 100
b = X % 100


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

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

i1 = math.floor(X/100)

for i in range(i1+1):
  for j in range(i1-i+1):
    for k in range(i1-i-j+1+1):
      for l in range(i1-i-j-k+1+1):
        for m in range(i1-i-j-k-l+1):
          for n in range(i1-i-j-k-l-m+1):
            if X==100*i + 101*j + 102*k +103*l +104*m +105*n:
              print(1)
              exit()
print(0)

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

for a in range(Y+1):
    for b in range(Y-a+1):
        for c in range(Y-a-b+1):
            for d in range(Y-a-b-c+1):
                for e in range(Y-a-b-c-d+1):
                    for f in range(Y-a-b-c-d-e+1):
                        count = a + b + c + d + e + f
                        if b+c*2+d*3+e*4+f*5 == X - (count*100):
                            print(1)
                            exit()

print(0)

Solution (Python):
import sys

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

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

left = (X // 100)
right = X - left * 100

number = 5
num_goods = 0
while number >= 0:
    goods = right // number
    right -= goods * number
    num_goods += goods
    if right == 0:
        break
    number -= 1

if right != 0:
    print(0)
    sys.exit()

if left < num_goods:
    print(0)
else:
    print(1)

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

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


imax = int(x/100)

if int(x%100) <=imax*5:
    print("1")
else:
    print("0")

Solution (Python):
X = int(input())
nolist=[]
for i in range(20):
    n = (i+1)*100
    m = n + (i+1)*5
    for l in range(n,m+1):
        nolist.append(l)
if X in nolist or X>=2000:
    print(1)
else:
    print(0)

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

Solution (Python):
X=int(input())
L=[]
for i in range(1,1001):
    for j in range(min(100,i*5+1)):
        L.append(i*100+j)
print('01'[X in L])

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

nmax = 100000

array = [0]*(nmax+1)
array[0] = 1

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

for i in range(nmax+1):
    for value in value_list:
        if i - value >= 0:
            if array[i-value] == 1:
                array[i] = 1

print array[X]

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

for a in range(1001):
        if 100 * a == X:
                print(1)
                exit()
        if 100 * a > X:
                continue
        for b in range(0,1001):
                if 100 * a + 101 * b == X:
                        print(1)
                        exit()
                if 100 * a + 101 * b > X:
                        continue
                for c in range(0,1001):
                        if 100 * a + 101 * b + 102 * c == X:
                                print(1)
                                exit()
                        if 100 * a + 101 * b  + 102 * c > X:
                                continue
                        for d in range(0,1001):
                                if 100 * a + 101 * b + 102 * c + 103 * d == X:
                                        print(1)
                                        exit()
                                if 100 * a + 101 * b  + 102 * c + 103 * d > X:
                                        continue
                                for e in range(0,1001):
                                        if 100 * a + 101 * b + 102 * c + 103 * d + 104 * e == X:
                                                print(1)
                                                exit()
                                        if 100 * a + 101 * b  + 102 * c + 103 * d + 104 * e > X:
                                                continue
                                        for f in range(0,1001):
                                                if 100 * a + 101 * b + 102 * c + 103 * d + 104 * e + 105 * f == X:
                                                        print(1)
                                                        exit()
                                                if 100 * a + 101 * b  + 102 * c + 103 * d + 104 * e + 105 * f > X:
                                                        continue
print(0)

Solution (Python):
x = input()

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

d1 = int(x[:-2])
d2 = int(x[-2:])
n = -(-d2//5)

print('1' if d1-n>=0 else '0')

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

max_count = 1000000

div, mod = divmod(X, 100)

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

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

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

h_num=int(X/100)
x_s=int(X%100)

ans=int(x_s/5)+1

if X%105==0:
    print(1)
elif ans<=h_num:
    print(1)
else:
    print(0)

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

affordable_set = {0}
for i in range(1,21):
    tmpset = affordable_set
    for j in range(6):
        shift = 100 + j
        tmpset = tmpset.union({j + shift for j in affordable_set})
    affordable_set = affordable_set.union(tmpset)

if x >= 2000:
    print(1)
else:
            
    if x in affordable_set:
        print(1)
    else:
        print(0)

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

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

Solution (Python):
X=int(input())
if X//100 != X//105:
  print(1)
elif X//100 == X//105 and X%105==0:
  print(1)
else:
  print(0)

Solution (Python):
x = int(input())
if x < 100:
    print(0)
    exit()
else:
    y = int(str(x)[:-2])
    z = int(str(x)[-2:])
    if (y*5) < z:
        print(0)
        exit()
    else:
        print(1)

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

simoniketa = int(str(N)[-2:])
more_100 = int(str(N)[:-2] + "00")





if more_100 >= simoniketa/5 * 100:
  print(1)
else:
  print(0)

Solution (Python):
X=int(input())
N=X//100
R=X%100
cnt=0
for i in range(5,0,-1):
    while R>=i:
        R-=i
        cnt+=1
    if R==0:
        break
print("1" if cnt<=N and R==0 else '0')

Solution (Python):
x = int(input())
x100, r = divmod(x, 100)
q, r = divmod(r, 5)
c = q
q, r = divmod(r, 4)
c += q
q, r = divmod(r, 3)
c += q
q, r = divmod(r, 2)
c += q
q, r = divmod(r, 1)
c += q
if x100 >= c:
    print(1)
else:
    print(0)

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

y = X % 105
z = X // 105

if y >= max(0, 100 - 5*z) or y == 0:
    print(1)
else:
    print(0)

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

nokori = x%100
max_n = x//100

if max_n < nokori//5 + nokori%5//4 + nokori%5%4//3 + nokori%5%4%3//2 + nokori%5%4%3%2:
    print(0)
else:
    print(1)

Solution (Python):
x = input()
if int(x) < 100:
    print(0)
    exit(0)
if 0 <= int(x[-2]+x[-1]) <= 5:
    print(1)
    exit(0)
elif 6 <= int(x[-2]+x[-1]) <= 10 and 2 <= int(x)//100:
    print(1)
elif 11 <= int(x[-2]+x[-1]) <= 15 and 3 <= int(x)//100:
    print(1)
elif 16 <= int(x[-2]+x[-1]) <= 20 and 4 <= int(x)//100:
    print(1)
elif 21 <= int(x[-2]+x[-1]) <= 25 and 5 <= int(x)//100:
    print(1)
elif 26 <= int(x[-2]+x[-1]) <= 30 and 6 <= int(x)//100:
    print(1)
elif 31 <= int(x[-2]+x[-1]) <= 35 and 7 <= int(x)//100:
    print(1)
elif 36 <= int(x[-2]+x[-1]) <= 40 and 8 <= int(x)//100:
    print(1)
elif 41 <= int(x[-2]+x[-1]) <= 45 and 9 <= int(x)//100:
    print(1)
elif 46 <= int(x[-2]+x[-1]) <= 50 and 10 <= int(x)//100:
    print(1)
elif 51 <= int(x[-2]+x[-1]) <= 55 and 11 <= int(x)//100:
    print(1)
elif 56 <= int(x[-2]+x[-1]) <= 60 and 12 <= int(x)//100:
    print(1)
elif 61 <= int(x[-2]+x[-1]) <= 65 and 13 <= int(x)//100:
    print(1)
elif 66 <= int(x[-2]+x[-1]) <= 70 and 14 <= int(x)//100:
    print(1)
elif 71 <= int(x[-2]+x[-1]) <= 75 and 15 <= int(x)//100:
    print(1)
elif 76 <= int(x[-2]+x[-1]) <= 80 and 16 <= int(x)//100:
    print(1)
elif 81 <= int(x[-2]+x[-1]) <= 85 and 17 <= int(x)//100:
    print(1)
elif 86 <= int(x[-2]+x[-1]) <= 90 and 18 <= int(x)//100:
    print(1)
elif 91 <= int(x[-2]+x[-1]) <= 95 and 19 <= int(x)//100:
    print(1)
elif 96 <= int(x[-2]+x[-1]) <= 99 and 20 <= int(x)//100:
    print(1)
else:
    print(0)

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

c = X % 100
d = X // 100

a5 = c // 5 + 1 if c % 5 else c // 5
if d < a5:
    print(0)
else:
    print(1)

Solution (Python):
X=int(input())
if X>=2000:
  print(1)
  exit()
else:
  for i in range(1,20):
    if 100*i<=X and X<=105*i:
      print(1)
      exit()
      
print(0)

Solution (Python):

X = int(input())

N = X/100 

Xn = X%100

n = 0

N5 = int(Xn/5)

N4 = int(Xn%5/4)

N3 = int((Xn-N5*5-N4*4)/3)

N2 = int((Xn-N5*5-N4*4-N3*3)/2)

N1 = Xn-N5*5-N4*4-N3*3-N2*2



if N5+N4+N3+N2+N1>N:
    print("0")
else:
    print("1")

Solution (Python):
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue


Mod = 1000000007
import sys

sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): 
    X = int(input())
    sx = str(X)
    lsx = len(sx)
    sx1 = sx[:lsx-2]
    sx2 = sx[lsx-2:]
    if lsx > 2:
        if int(sx1)*5 >= int(sx2):
            print(1)
        else:
            print(0)
    else:
        print(0)
if __name__ == "__main__":
    main()

Solution (Python):

import math
X = int(input())

q, mod = divmod(X, 100)

q2, mod2 = divmod(mod, 5)

q3, mod3 = divmod(X, 105)

if mod3 == 0:
  print(1)
elif q2+1 <= q:
  print(1)
else:
  print(0)

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

Solution (Python):
if __name__ == "__main__":
    x = int(input())

    mod = x % 100
    num = x // 100

    for i in range(5, 0, -1):
        if mod % i == 0 and num >= mod // i:
            print(1)
            exit()
        else:
            num -= mod // i
            mod %= i

    print(0)

Solution (Python):
x = int(input())
total = 0
if x % 10 == 9:
        total += 104 + 105
elif x % 10 == 8:
        total += 104 + 104
elif x % 10 == 7:
        total += 103 + 104
elif x % 10 == 6:
        total += 105 + 101
elif x % 10 == 5:
        total += 105
elif x % 10 == 4:
        total += 104
elif x % 10 == 3:
        total += 103
elif x % 10 == 2:
        total += 102
elif x % 10 == 1:
        total += 101

if x % 100 // 10 == 1:
        total += 105 + 105
elif x % 100 // 10 == 2:
        total += 105 * 4
elif x % 100 // 10 == 3:
        total += 105 * 6
elif x % 100 // 10 == 4:
        total += 105 * 8
elif x % 100 // 10 == 5:
        total += 105 * 10
elif x % 100 // 10 == 6:
        total += 105 * 12
elif x % 100 // 10 == 7:
        total += 105 * 14
elif x % 100 // 10 == 8:
        total += 105 * 16
elif x % 100 // 10 == 9:
        total += 105 * 18

if total <= x:
        print(1)
else:
        print(0)

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

x=X%100
C=X//100

c=0
while(True):
    if(x>=5):
        x-=5
    else:
        x=0
    c+=1
    if(x==0):
        if(C>=c):
            print(1)
            exit()
        else:
            print(0)
            exit()

Solution (Python):
import sys
x=int(input())
n=1
while(100*n<=x):
    if(x <= 105*n):
        print(1)
        sys.exit()
    else:
        n+=1
print(0)

Solution (Python):


import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

K = I()

N = 6
a = [100,101,102,103,104,105]
m = [1000000 for i in range(N)]


dp = [0 if i==0 else -1 for i in range(K + 1)]


for i in range(N):
    dp_tmp = []
    for j in range(K + 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):
from itertools import combinations_with_replacement
x = int(input())
c, m = x // 100, x % 100
ans = 0
for t in combinations_with_replacement(range(6), c):
    if sum(t) == m:
        ans = 1
        break
print(ans)

Solution (Python):
from math import ceil,floor
x = int(input())

lower_sum = ceil(x/105)
upper_sum = floor(x/100)
num_list = list(range(lower_sum, upper_sum+1))

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

print("0")

Solution (Python):
import sys
x=int(input())
if x>=5000:
    print(1)
else:
    for i_100 in range(x//100+1):
        for i_101 in range(x//100+1):
            for i_102 in range(x//100+1):
                for i_103 in range(x//100+1):
                    for i_104 in range(x//100+1):
                        for i_105 in range(x//100+1):
                            if i_100*100+i_101*101+i_102*102+i_103*103+i_104*104+i_105*105==x:
                                print(1)
                                sys.exit()
    print(0)

Solution (Python):
import numpy as np 
X = int(input())
if 100<=X<=105:
    print(1)
    exit()

Nmax = X//100

X -= 100*Nmax

x = np.ceil(X/5)

if Nmax < x:
    print(0)
else:
    print(1)

Solution (Python):
x=int(input())
a=x//100
b=x%100
answer=0
for i in range(a):
    if b-5>=0:
        b-=5
    elif b-4>=0:
        b-=4
    elif b-3>=0:
        b-=3
    elif b-2>=0:
        b-=2
    elif b-1>=0:
        b-=1
if b==0:
    answer=1
print(answer)

Solution (Python):
import math
x=int(input())
a=math.floor(x/100)
b=x%100


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

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

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

num_buy = total // 100
mod = total % 100

num = 0
for i in (5, 4, 3, 2, 1):
    diff = mod // i
    num += diff
    mod -= diff * i

if num <= num_buy:
    print("1")
else:
    print("0")

Solution (Python):
import math 
def main():
    X = int(input())
    a = math.ceil(X/105)
    b = 105*a-X
    i = 0
    while 1:
        if b>5:
            b-=5
            i+=1 
        else:
            if b==0:
                break
            else:
                i+=1
                break
    if a<i:
        print(0)
    else:
        print(1)

                
if __name__ == "__main__":
    main()

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

f()

Solution (Python):
X = int(input())
num = (X+104) // 105
print('1' if num*100 <= X <= num*105 else '0')

Solution (Python):
import math

X = int(input())
need = math.ceil((X % 100) / 5)
able = X // 100

if able >= need:
    print(1)
else:
    print(0)

Solution (Python):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)
INF = 10**30

def main():
    n = int(input().strip())
    a = (n % 100) // 10
    b = (n % 10)
    
    
    
    if b == 0:
        k = 0
    elif 1 <= b <= 5:
        k = 1
    else:
        k = 2
    s = a * 2 + k
    
    if s <= n / 100:
        print(1)
    else:
        print(0)



if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())
a = x // 105
b = x // 100
ans = 0
for i in range(a, b+1):
  s = x - i * 100
  t = s // 5
  if not s % 5 == 0:
    t = t + 1
  if t <= i:
    ans = 1
    break
print(ans)

Solution (Python):
N= int(input())
 
C = [100,101,102,103,104,105]
 

N_100 = int(N/100)

N_XX = int((N%100)/5)
N_flag = (N%100)%5
if N_100 > N_XX:
    print(1)
elif N_100 ==N_XX and N_flag==0:
    print(1)
else:
      print(0)

Solution (Python):
import math

x = int(input())

if x > 1999:
  print('1')
elif x < 100:
  print('0')
else:
  upper, under = divmod(x, 100)
  if under == 0:
    print('1')
  elif upper > (under - 1) // 5:
    print('1')
  else:
    print('0')

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

cnt = 0

n5 = 0
n4 = 0
n3 = 0
n2 = 0
n1 = 0
n0 = 0

while X >= 100:
  if( (X % 100) % 5 == 0 and (X % 100) != 0 ): 
    X -= 105
    n5 += 1
  elif( (X % 100) % 4 == 0 and (X % 100) != 0 ): 
    X -= 104
    n4 += 1
  elif( (X % 100) % 3 == 0 and (X % 100) != 0 ): 
    X -= 103
    n3 += 1
  elif( (X % 100) % 2 == 0 and (X % 100) != 0 ): 
    X -= 102
    n2 += 1
  elif( (X % 100) % 1 == 0 and (X % 100) != 0 ): 
    X -= 101
    n1 += 1
  else:
    n0 = n0 + X / 100
    X = 0
    break
    
if( X == 0 ):
  print("1")
else:
  print("0")

Solution (Python):
x = int(input()) 
l=[5,4,3,2,1]
c=x//100
x=x % 100
for i in l:
  s=x//i
  x=x % i
  c-=s
if c<0:print(0)
else:print(1)

Solution (Python):
def solve(x: int) -> bool:
    n = min(1000, x // 100 + 1)  

    for a in range(x // 100 + 1):
        for b in range(n - a + 1):
            for c in range(n - a - b + 1):
                for d in range(n - a - b - c + 1):
                    for e in range(n - a - b - c - d + 1):
                        for f in range(n - a - b - c - d - e + 1):
                            if a * 100 + b * 101 + c * 102 + d * 103 + e * 104 + f * 105 == x:
                                return True
    return False


x = int(input().strip())
ans = solve(x)
if ans:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
print(int((x+104)//105<=x//100))

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

buy_count = (x//105) + 1
over_cost = 105 - x%105
can_buy = False

while buy_count>=0:
    if over_cost == 105:
        can_buy = True
        break
    
    if over_cost >= 5:
        over_cost -= 5
        buy_count -= 1
    elif over_cost >= 4:
        over_cost -= 4
        buy_count -= 1
    elif over_cost >= 3:
        over_cost -= 3
        buy_count -= 1
    elif over_cost >= 2:
        over_cost -= 2
        buy_count -= 1
    elif over_cost >= 1:
        over_cost -= 1
        buy_count -= 1
    elif over_cost == 0:
        can_buy = True
        break
        
if can_buy:
    print('1')
else:
    print('0')

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

p=X//100
q=X%100

if p>=20:
	print(1)
elif q<=p*5:
	print(1)
else:
	print(0)

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

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

if X//105==X/105:
  print(1)
else:
  N=X//105 +1
  a=N*105 -X
  if a<=5*N:
      print(1)
  else:
      print(0)

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

maxi = n // 100 +1
for i in range(maxi):
    if 100 * i == n:
        print(1)
        exit()
    for j in range(maxi -i):
        if 100*i+101*j == n:
            print(1)
            exit()
        for k in range(maxi-(i+j)):
            if 100*i+101*j+102*k == n:
                print(1)
                exit()
            for l in range(maxi-(i+j+k)):
                if 100*i+101*j+102*k+103*l == n:
                    print(1)
                    exit()
                for m in range(maxi-(i+j+k+l)):
                    if 100*i+101*j+102*k+103*l+104*m == n:
                        print(1)
                        exit()
                    for o in range(maxi-(i+j+k+l+m)):
                        if 100*i+101*j+102*k+103*l+104*m+105*o == n:
                            print(1)
                            exit()
print(0)

Solution (Python):
import numpy as np

X = int(input())

dp = np.zeros(X + 1)

if X >= 105:
    dp[100] = dp[101] = dp[102] = dp[103] = dp[104] = dp[105] = 1
elif X >= 104:
    dp[100] = dp[101] = dp[102] = dp[103] = dp[104] = 1
elif X >= 103:
    dp[100] = dp[101] = dp[102] = dp[103] = 1
elif X >= 102:
    dp[100] = dp[101] = dp[102] = 1
elif X >= 101:
    dp[100] = dp[101] = 1
elif X >= 100:
    dp[100] = 1


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

print(int(dp[X]))

Solution (Python):
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    X = int(inputs[0])
    NUM = 1000000
    items = [100, 101, 102, 103, 104, 105]
    r = X

    not_fin = True

    while r >= 100:
        amari = r % 100
        if r == 0:
            return 1
        if amari == 0:
            return 1

        matubi = amari % 10
        if amari >= 5:
            r -= 105
        else:
            r -= items[matubi]
    if r == 0:
        return 1
    return 0


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):
x = int(input())
h = x//100
c = x%100

n5 = c//5

if c%5 != 0:
    n5 += 1

if n5 <= h:
    print(1)
else:
    print(0)

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

w = X // 100
ans = w * 105
if X <= ans:
    print(1)
else:
    print(0)

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

have = x // 100
need = x % 100

dp = [ -1 for i in range(100) ]
dp[0] = 0
dp[1] = 1
dp[2] = 1
dp[3] = 1
dp[4] = 1
dp[5] = 1
for j in range(6,100):
    dp[j] = 10**9
    for i in [1,2,3,4,5]:
        dp[j] = min( dp[j], dp[j-i] + 1 )

if dp[need] <= have:
    print(1)
else:
    print(0)

Solution (Python):


''' 
------------------------
author : iiou16
------------------------
'''

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

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

if __name__ == '__main__':
    main()

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

end = int(x / 100) + 1
start = int(x / 105)

for i in range(start, end):
    rest = x - (i * 100)
    if rest < 0 or 5 * i < rest:
        continue
    else:
        print(1)
        sys.exit()

print(0)

Solution (Python):

from sys import stdin


def solve(tc):
    x = int(stdin.readline().strip())
    div = x // 100
    mod = x % 100

    if div >= 20 or div*5>=mod:
        print(1)
        return

    print(0) 


LOCAL_TEST = not __debug__
if LOCAL_TEST:
    infile = __file__.split('.')[0] + "-test.in"
    stdin = open(infile, 'r')

tcs = (int(stdin.readline().strip()) if LOCAL_TEST else 1)
tc = 1
while tc <= tcs:
    solve(tc)
    tc += 1

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

Solution (Python):
import math

X = int(input())
NUM = 1000000

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

ONI = 0
SND = 1
COK = 2
CKE = 3
AME = 4
PCN = 5

units = X / 100
mod = X % 100

counter = 0

if (units == 0):
    print(1)
    exit()
else:
    while(counter < units):
        if (mod >= PCN):
            mod -= PCN
        elif (mod >= AME):
            mod -= AME
        elif (mod >= CKE):
            mod -= AME
        elif (mod >= COK):
            mod -= AME
        elif (mod >= SND):
            mod -= AME
        else:
            print(1)
            exit()
        counter += 1

print(0)

Solution (Python):
X=int(input())
if X>=2000:
  print(1)
else:
  tmp=X%100
  co=X//100
  fo_tmp=6
  for i in range(1,6):
    if i*co>=tmp:
      fo_tmp=i
      break
  if fo_tmp==6:
    print(0)
  else:
    print(1)

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

hund=n//100
amari=n%100

pc_num=amari//5
if pc_num*105>n:
    print(0)
else:
    rest = n-(pc_num*105)
    if rest==0:
        print(1)
    elif rest<100:
        print(0)
    else:
        print(1)