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):
dp = [False] * 100200
dp[0] = True
for x in range(100000):
    if dp[x]:
        for i in range(100, 106):
            dp[x+i] = True
print(int(dp[int(input())]))

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

Solution (Python):
N = int(input())
C = [100+i for i in range(6)]
T = [float('inf')]*(N+1)
T[0] = 0

for i in range(6):
    for j in range(C[i], N+1):
        T[j] = min(T[j], T[j - C[i]] + 1)

if T[N] != float('inf'):
    print(1)
else:
    print(0)

Solution (Python):
import sys, math
from functools import lru_cache
from collections import deque
sys.setrecursionlimit(500000)
MOD = 10**9+7

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

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

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

@lru_cache(maxsize=None)
def f(x):
    if x < 0:
        return False
    if (x%100==0) or (x%101==0) or (x%102==0) \
            or (x%103==0) or (x%104==0) or (x%105==0):
        return True
    return f(x-100) or f(x-101) or f(x-102) \
            or f(x-103) or f(x-104) or f(x-105)

def main():
    X = ii()
    print(1 if f(X) else 0)


if __name__ == '__main__':
    main()

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

for i in range(100000//100 +1):
    if X >= i*100 and X<= i*105:
        print(1)
        exit()
print(0)

Solution (Python):
n=int(input())
dp=[0]*(10**5+1)
dp[100]=1
dp[101]=1
dp[102]=1
dp[103]=1
dp[104]=1
dp[105]=1
for i in range(106,10**5+1):
    if dp[i-100]==1:
        dp[i]=1
    elif dp[i-101]==1:
        dp[i]=1
    elif dp[i-102]==1:
        dp[i]=1
    elif dp[i-103]==1:
        dp[i]=1
    elif dp[i-104]==1:
        dp[i]=1
    elif dp[i-105]==1:
        dp[i]=1
print(dp[n])

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

dp = [True] + [False] * (x+110)

for i in range(len(dp)):
    if not dp[i]: continue
    for food in range(100, 106):
        if i+food >= len(dp): continue
        dp[i+food] = True

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

Solution (Python):

import sys
input = sys.stdin.readline  
X = int(input())
ans =0
Possible =[]
if X >=2000:
    ans =1
else:
    Possible =[(i*100,i*105) for i in range(1,21)]
    for p in Possible:
        if p[0] <= X <=p[1]:
            ans =1
            break
print(ans)

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

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

if x//100 > 19:
    print(1)
else:
    tmp1 = x%100
    tmp2 = x//100
    if 5*tmp2<tmp1:
        print(0)
    else:
        print(1)

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

l = [1,2,3,4,5]
a = X // 100
b = X % 100

ans = 0
for i in l:
    if b % i == 0:
        if b // i <= a:
            ans = 1
            break

print(ans)

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

n = X//100
k = X % 100

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

Solution (Python):
x = int(input())
ans = 0
flag = False
for a in range((x//100)+1):
  for b in range((x//101)+1):
    for c in range((x//102)+1):
      for d in range((x//103)+1):
        for e in range((x//104)+1):
          for f in range((x//105)+1):           
            if (100*a) + (101*b) + (102*c) + (103*d) + (104*e) + (105*f)== x:
              ans += 1
              flag = True
              break
          if flag:
            break
        if flag:
          break
      if flag:
        break
    if flag:
      break
  if flag:
    break
  
if ans == 0:
  print(0)
else:
  print(1)

Solution (Python):
def main2():
    x = int(input())
    r, m = divmod(x, 100)
    x -= r * 100

    count = 0

    while(x > 0):
        if x >= 5:
            x -= 5
            count += 1
        elif x >= 4:
            x -= 4
            count += 1
        elif x >= 3:
            x -= 3
            count += 1
        elif x >= 2:
            x -= 2
            count += 1
        elif x >= 1:
            x -= 1
            count += 1

    if r >= count:
        print(1)
    else:
        print(0)

if __name__ == "__main__":
    main2()

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

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

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

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

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


def main():
    x = int(readline().rstrip())
    ans = x // 100
    if ans == 0:
        print(0)
        return

    sur = x - ans * 100
    print(1 if sur / ans <= 5 else 0)


if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
b=0
x = N //100
for y in range(100*x,105*x+1):
  if N==y:
    print(1)
    exit()
print(0)

Solution (Python):
N=int(input())
b=0
for x in range(1,N//100+1):
  for y in range(100*x,105*x+1):
    if N==y:
      print(1)
      exit()
print(0)

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

w = x // 100
y = x % 100

if w * 5 >= y:
    print(1)
else:
    print(0)

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

N, r = divmod(X, 100)

if r <= 5*N:
  print(1)
else:
  print(0)

Solution (Python):
N=int(input())
C=[]
b=0
for x in range(1,N//100+1):
  for y in range(100*x,105*x+1):
    if N==y:
      b=1
  if b==1:
    break
print(b)

Solution (Python):

n = int(input())
a = n % 100
b = n//100
if b >= (a//5 + (a % 5 != 0)):
    print(1)
else:
    print(0)

Solution (Python):
dp = [True]  
x = int(input())
for i in range(99):
    dp.append(False)
for i in range(100, x + 1):
    if(i < 106):
        dp.append(True)
    else:
        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.append(True)
        else:
            dp.append(False)
if(dp[x]):
    print(1)
else:
    print(0)

Solution (Python):
import itertools
x = int(input())
a = x // 100
b = x - a * 100
arr = [0, 1, 2, 3, 4, 5]
ans = 0
for v in itertools.combinations_with_replacement(arr, a):
    k = sum(list(v))
    if k == b:
      ans = 1
      break
print(ans)

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

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

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




flag=0
for i in range(1,1001):
    if i*100 <= X and X <= i*105:
        flag=1
        break
print(flag)

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

for i1 in range(x//105, -1, -1):
  x2 = x - 105*i1
  for i2 in range(x2//104, -1, -1):
    x3 = x2 - 104*i2
    for i3 in range(x3//103, -1, -1):
      x4 = x3 - 103*i3
      for i4 in range(x4//102, -1, -1):
        x5 = x4 - 102*i4
        for i5 in range(x5//101, -1, -1):
          x6 = x5 -101*i5
          for i6 in range(x6//100, -1, -1):
            if x5 - 100*i6 == 0:
              print(1)
              exit()
print(0)

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

q = X // 100

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

Solution (Python):
X = int(input())
dp = [0 for _ in range(X + 110)]
dp[0] = 1
for i in range(X + 1):
    if dp[i] == 0:
        continue
    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])

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

n=-1
for i in range(int(x/105),int(x/100)+1):
    n=i


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

Solution (Python):
x = int(input())
cnt = x//100
if x < 100 :
    print("0")
else :
    for i in range(cnt) :
        if 100*cnt <= x <= 105*cnt :
            print("1")
            break
    else :
        print("0")

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

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

Solution (Python):
def main():
    X = int(input())
    N = X // 100
    M = X % 100
    if M == 0:
        print(1)
        return
    if M % 5 == 0 and M // 5 <= N:
        print(1)
    elif M % 5 > 0 and M // 5 + 1 <= N:
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
coins = [100,101,102,103,104,105]
dp = [int(i%coins[0]==0) for i in range(N+1)]
for coin in coins[1:]:
  for i in range(coin,N+1):
    dp[i] += dp[i - coin]
if dp[-1] != 0:
  print(1)
else:
  print(0)

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

a = x-x//100*100
print(1) if a//5 + (a%5!=0) <= x//100 else print(0)

Solution (Python):
def resolve():
    X = int(input())
    dp = [0 for _ in range(X + 110)]
    dp[0] = 1
    for i in range(X + 1):
        if dp[i] == 0:
            continue
        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])


resolve()

Solution (Python):
x=int(input())
kosu=0
for i in range(1000):
    kosu+=1
    if 100*kosu<=x<=105*kosu:
        print(1)
        quit()
print(0)

Solution (Python):
dp = [True] 
x = int(input())
for i in range(99):
  dp.append(False)
for i in range(100, x+1):
  if(i < 106):
    dp.append(True)
  else:
    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.append(True)
    else:
      dp.append(False)
if(dp[x]):
  print(1)
else:
  print(0)

Solution (Python):

ans = 0
X = int(input())
for i in range(1500):
    if 100*i<=X<=105*i:
        ans = 1
        break
print(ans)

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

for i in range(1000):
  if 100*i<=n and 105*i>=n:
    print("1")
    exit()
print("0")

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

if X >= 2000:
  print("1")
else:
  p=X//100
  if 100*p <= X <= 105*p:
    print("1")
  else:
    print("0")

Solution (Python):
stock = [1]+[0] * 100005
item = [100, 101, 102, 103, 104, 105]
for x in range(100001):
    for y in item:
        if stock[x - y]:
            stock[x] = 1

n = int(input())
if stock[n]:
    print(1)
else:
    print(0)

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

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

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

Solution (Python):
N = int(input())
m = N//100
M = N//105
if 100*m <= N <= 105*m or 100*M <= N <= 105*M:
    print(1)
else:
    print(0)

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

canbuy = x // 100
amari = x % 100

num = amari // 5
amari %= 5
if amari != 0:
    num += 1

if num <= canbuy:
    print(1)
else:
    print(0)

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

dp = [0] * (100200)
dp[0] = 1

for i in range(X + 1):
    if dp[i] == 1:
        for j in range(6):
            dp[i + 100 + j] = 1
            if i + 100 + j == X:
                print(1)
                exit()
print(0)

Solution (Python):

x = int(input())
n = x // 100

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

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

for i in range(n):
    if x - 5 >= 0:
        x -= 5
    elif x - 4 >= 0:
        x -= 4
    elif x - 3 >= 0:
        x -= 3
    elif x - 2 >= 0:
        x -= 2
    elif x - 1 >= 0:
        x -= 1
    else:
        break

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

Solution (Python):

x = int(input())
print("10"[x % 100 > (x // 100) * 5])

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

for i in range(X+1):
    for j in range(100, 106):
        if i+j<=X:
            dp[i+j] |= dp[i]

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

Solution (Python):
n = int(input())
if n <= 99:
  print(0)
  exit()
if 100 <= n <= 105:
  print(1)
  exit()
dp = [True] + [False] * n
for i in range(100, n + 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] = True
print([0, 1][dp[n]])

Solution (Python):









import sys
input = sys.stdin.readline

X = int(input())

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

Solution (Python):


def solve(x):
    if x >= 2000:
        return True
    memo = [True] + [False]*x

    def dp(k):
        if k == 0:
            return True
        for i in range(100,106):
            if k-i >= 0 and memo[k-i]:
                return True
        
        return False
    
    for i in range(x):
        memo[i+1] = dp(i+1)
    return memo[x]



def main():
    X = int(input())
    print(int(solve(X)))
    return

if __name__ == '__main__':
    main()

Solution (Python):

import sys
from collections import deque, defaultdict
from math import sqrt, factorial





def solve():
    xd = [100, 101, 102, 103, 104, 105]
    mxn = int(1e5) + 1
    d = [0] * (mxn)
    d[0] = 1
    for e in xd:
        for i in range(mxn):
            if d[i] and i + e < mxn: d[i + e] = 1
    t = int(input())
    print(d[t])



t = 1

for case in range(1,t+1):
    ans = solve()


"""

a aa c ca c a b a ab a b c

"""

Solution (Python):
x = int(input())
price = [100, 101, 102, 103, 104, 105]
 
dp = [False for _ in range(x + 1)]
 
dp[0] = True

for i in range(1, x + 1):
    for j in range(6):
        if i - price[j] >= 0:
            if dp[i - price[j]]:
                dp[i] = True
                break
    else:
        dp[i] = False
 
if dp[x]:
    print(1)
else:
    print(0)

Solution (Python):
x=int(input())
syo=x//100
amari=int(str(x)[-2:])
if amari/5<=syo:
    print(1)
    exit()
print(0)

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

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

P=0
Q=0
F=False
while P<=X:
    if P<=X<=Q:
        F=True
    P+=100
    Q+=105

print(1*F)

Solution (Python):
X=int(input())
maisu_max=X//100
if X<100:
    print(0)
    exit()
else:
    X=str(X)
    X=int(X[-2:])
    if X==0:
        print(1)
        exit()
ans=100
for i in range(2):
    for j in range(2):
        for k in range(2):
            for l in range(2):
                for m in range(20):
                    tmp=i+j*2+k*3+l*4+m*5
                    if tmp==X:
                        if i+j+k+l+m<ans:
                            ans=i+j+k+l+m
if maisu_max>=ans:
    print(1)
else:
    print(0)

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

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

Solution (Python):
x = int(open(0).read().split()[0])

import heapq

s = {0} 
hq = [0]

prices = list(range(100, 106))

tmp = 0

while tmp<x:
    tmp = heapq.heappop(hq)
    for price in prices:
        new = tmp+price
        if new not in s:
            s.add(new)
            heapq.heappush(hq, new)

print(int(tmp == x))

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




'''
a=[]
b=[]
for i in range():
    A, B = map(int, input().split())
    a.append(A)   
    b.append(B)'''

x=int(input())
ok=[1]+[0]*100000
ok[100]=1
if x<100:
    print(0)
    sys.exit()
a=[100,101,102,103,104,105]
for i in range(100,x+1):
    for item in a:
        if i-item>=0 and ok[i-item]==1:
            ok[i]=1
print(ok[x])

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

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

n=x%100
m=x//100

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

Solution (Python):
x = int(input())
kosuu, amari = x // 100, x % 100
ans = 0

for i in range(kosuu):
    amari -= 5
    if amari <= 0:
        ans = 1
        break

print(ans)

Solution (Python):
x = int(input())
kosuu, amari = x // 100, x % 100
ans = 0

for i in range(kosuu):
    amari -= 5
    if amari <= 0:
        ans = 1
        break

print(ans)

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re











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

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
dp = [False] * 100001
dp[0] = True
food = [100,101,102,103,104,105]
for i in range(1,100001):
    for j in range(len(food)):
        if i - food[j] >= 0:
            dp[i] |= dp[i - food[j]]
X = I()
print('1' if dp[X] else '0')

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

Solution (Python):
x = int(input())
for i in range(1,x+1):
    if 100*i <= x and x <= 105*i:
        print(1)
        break
else:
    print(0)

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

dp = [False for _ in range(X + 1)]

dp[0] = True
for i in range(1, X + 1):
    for j in range(6):
        if i - price[j] >= 0:
            if dp[i - price[j]]:
                dp[i] = True
                break
    else:
        dp[i] = False

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

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

for i in range(X):
    if lis[i] == 1:
        for j in range(100, 106):
            lis[i+j] = 1

print(lis[X])

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

Solution (Python):
from collections import defaultdict

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

x = readInt()

for i in range(int(x//105),int(x//100)+2):
	t = x-100*i
	if 0<=t and t<=5*i:
		print(1)
		exit()
print(0)

Solution (Python):
X = int(input())
number = X//100
teen = X%100

if teen <= 5*number:
    print(1)
else:
    print(0)

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

dp = [0] * (X+1+105)
dp[0] = 1

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

print(dp[X])

Solution (Python):
X=input()
Y=int(X)
if Y<=99:
    print(0)

else:
    a=10*int(X[-2])+int(X[-1])
    b=a//5
    if a%5!=0:
        b+=1
    if b>Y//100:
        print(0)
    else:
        print(1)

Solution (Python):
X = int(input())
dp = [False] * (X+1)
dp[0] = True
def judge(i, j):
    if i >= j:
        return dp[i-j]
    else:
        return False
    
for i in range(1, X+1):
    dp[i] = judge(i, 100) or judge(i, 101) or judge(i, 102) or judge(i, 103) or judge(i, 104) or judge(i, 105)
        
print(int(dp[X]))

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

a = X // 100
b = X % 100

m = 5*a

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

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

Solution (Python):






X = int(input())





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

Solution (Python):
x = int(input())
d, mod = divmod(x, 100)
if 100 * d <= x <= 105*d:
    print(1)
else:
    print(0)

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

Dp = [False for _ in range(X+1)]

Dp[0] = True
for i in range(100, X+1):
    if any([Dp[i - j] == True for j in range(100, 106)]):
        Dp[i] = True
if Dp[X]:
    print(1)
else:
    print(0)

Solution (Python):
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    x = I()
    n = x//100
    a = x%100
    print(1 if a <= 5*n else 0)

Solution (Python):
def resolve():
    X = int(input())
    if X <= 99:
        print('0')
        return

    for i in range(1, 1000 + 1):
        if 100 * i + 6 + (i - 1) * 5 <= X <= 100 * i + 99:
            print('0')
            return
    print('1')

    return

resolve()

Solution (Python):
import sys
input = sys.stdin.readline
def main():
    X = int(input())
    NUM = X//100
    A = X%100
    if A <= NUM*5:
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()

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

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

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())
if x<100:
    print(0)
else:
    n=x//100
    y=x%100
    if y==0:
        print(1)
    else:
        if int((y+4)//5)<=n:
            print(1)
        else:
            print(0)

Solution (Python):
from itertools import product


def main():
    X = int(input())
    A, B, C, D, E= [(X // p) + 1 for p in range(100, 105)]

    P = product(range(A), range(B), range(C), range(D), range(E))
    flag = 0
    if X >= 100:
        for a, b, c, d, e in P:
            f = X - (a * 100 + b * 101 + c * 102 + d * 103 + e * 104)
            if f >= 0 and f % 105 == 0:
                flag = 1
                break

    print(flag)


if __name__ == '__main__':
    main()

Solution (Python):



from fractions import gcd


from collections import deque,defaultdict











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

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
X = I()
shop = [100,101,102,103,104,105]
dp = [False] * (X+1) 
dp[0] = True
for i in range(X+1):
    for s in shop:
        if i - s >= 0:
            dp[i] = dp[i - s] | dp[i]
print('1' if dp[X] else '0')

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

Solution (Python):
x = int(input())
dp = [0]*(x+105)
dp[0] = 1
for i in range(x):
    for j in range(6):
        dp[i+100+j] = dp[i+100+j] | dp[i]
print(dp[x])

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

Solution (Python):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

x=int(input())
a,b=divmod(x,100)
if a*5>=b:
    print(1)
else:
    print(0)

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

dp=[0]*101000

dp[100]=1
dp[101]=1
dp[102]=1
dp[103]=1
dp[104]=1
dp[105]=1

for i in range(100000):
    if dp[i]!=0:
        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]!=0:
    print("1")

else:
    print("0")

Solution (Python):
x = int(input())
div,mod = divmod(x, 100)

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

X = int(input())
dp = [0]*(X+1)
dp[0] = 1
for i in range(1, X+1):
    for yen in range(100, 106):
        if yen<=i:
            if dp[i-yen]==1:
                dp[i] = 1
if dp[X]:
    print(1)
else:
    print(0)

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

Solution (Python):
def main():
    X = int(input())
    if X < 100:
        print(0)
    elif 2000 <= X:
        print(1)
    else:
        a = X // 100
        b = a * 5
        if X % 100 <= b:
            print(1)
        else:
            print(0)


if __name__ == '__main__':
    main()

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

num = X//100
amari = X%100

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

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

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

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

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

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

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy
import decimal



if __name__ == "__main__":
    x = int(input())
    dp = [0]*101010
    dp[0] = 1
    for i in range(100,101010):
        for j in range(100,106):
            if dp[i-j]:
                dp[i] = 1
    print(dp[x])

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

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

h=x//100
t=x%100
ans=1
if h*5<t:
  ans=0
print(ans)

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

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

dp = [0]*100001
dp[100],dp[101],dp[102],dp[103],dp[104],dp[105] = 1,1,1,1,1,1

for i in range(99896):
    if dp[i] == 1:
        dp[i+100],dp[i+101],dp[i+102],dp[i+103],dp[i+104],dp[i+105] = 1,1,1,1,1,1
print(dp[n])

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

Solution (Python):
x=int(input())
p=[100,101,102,103,104,105]
ans=[False]*2001
ans[0]=True
for i in range(2000):
    if ans[i]:
        for j in p:
            if i+j>2000:
                continue
            else:
                ans[i+j]=True
if x>2000:
    print(1)
elif ans[x]:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
a = x // 100
b = x - a * 100

while b > 5:
	b = b - 5
	a -= 1

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

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

r = X%100

x5 = r//5
r5 = r%5

if r5:
  x5+=1
  
if x5*100 <= X:
  print(1)
else:
  print(0)

Solution (Python):
L = [0]*100501
for i in range(6):
    L[100+i] = 1
for i in range(100001):
    if L[i]==1:
        for j in range(6):
            if (L[i+j+100] == 0):
                L[i+j+100] = 1
print(L[int(input())])

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

dp = [0 for _ in range(X+1)]
dp[0] = 1
f = 1

for i in range(X+1):
    for j in num:
        if i-j >= 0:
            if dp[i-j]:
                dp[i] = 1

print(dp[X])

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

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

Solution (Python):
X = input()

ans = "1"
if int(X) < 100:
	ans = "0"
elif not int(X[:-2])*5 >= int(X[-2:]):
	ans = "0"

print(ans)

Solution (Python):
x = int(input())
y = x//100
z = x%100

if z > y*5:
    print(0)
else:
    print(1)

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

Solution (Python):
import sys
n=int(input())
l=n//100
d=n%100
for i in range(5, 0, -1):
  if d // i > 0:
    l = l - (d // i)
    d = d - i * (d // i)
  if d == 0 and l >= 0:
    print(1)
    sys.exit()
  if l < 0:
    break
print(0)

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *

X = INT()
lim = 10**5+1
dp = [0]*lim
t = [100 + i for i in range(6)]

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

for j in range(106, lim):
	dp[j] += sum([dp[j-k] for k in t])

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

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

Solution (Python):
X=int(input())
dp=[0]*(X+105)
dp[0]=1
for x in range(X):
    if dp[x]==1:
        for price in range(100,106):
            dp[x+price]=1
print(dp[X])

Solution (Python):
X=int(input())
dp=[0]*(X+105+1)
dp[0]=1
for x in range(X):
    if dp[x]==1:
        for price in range(100,106):
            dp[x+price]=1
print(dp[X])

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

Solution (Python):

X = int(input())

if X > 2000:
    out=1
elif X < 100:
    out=0
else:
    A = X // 100
    if X - A*100 <= 5*A:
        out=1
    else:
        out=0
print(out)

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

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



x = int(input())










     
def main():
   if x >2000:
       print(1)
   else:
        flag = False
        for i in range(21):
            for j in range(20):
                for k in range(20):
                    for l in range(20):
                        for m in range(20):
                            for n in range(20):
                                if 100*i + 101*j+ 102*k + 103*l + 104*m + 105*n == x:
                                    flag = True
        if flag :
            print(1)
        else:
            print(0)

    

if __name__ == '__main__':
    main()

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

for s in range(6):
  for x in range(X+1):
    if DP[x]==1 and x+L[s]<=X:
      DP[x+L[s]]=1
print(DP[X])