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())
dp = [False] * (x+1)
dp[0] = 1
for i in range(0, x+1):
    if dp[i]:
        try:
            dp[i + 100] = True
            dp[i + 101] = True
            dp[i + 102] = True
            dp[i + 103] = True
            dp[i + 104] = True
            dp[i + 105] = True
        except:
            pass

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

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline
def main():
    X = int(input())
    dp = [0] * (X+1)
    dp[0] = 1
    for base in range(100, X+1):
        can_buy = False
        for fraction in range(6):
            pre_cost = base - (100 + fraction)
            if dp[pre_cost] == 1:
                can_buy = True
                break
        if can_buy:dp[base] = 1
    print(dp[-1])
if __name__ == "__main__":
    main()

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

for a in range(21):
    for b in range(21-a):
        for c in range(21-a-b):
            for d in range(21-a-b-c):
                for e in range(21-a-b-c-d):
                    for f in range(21-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):
X=int(input())
if X>=2000:
    print(1)
    exit()
for i in range(20):
    if 100*i>X:
        continue
    for j in range(20):
        if 100*i+101*j>X:
            continue
        for k in range(20):
            if 100*i+101*j+102*k>X:
                continue
            for m in range(20):
                if 100*i+101*j+102*k+103*m>X:
                    continue
                for n in range(20):
                    if 100*i+101*j+102*k+103*m+104*n>X:
                        continue
                    for p in range(20):
                        if 100*i+101*j+102*k+103*m+104*n+105*p==X:
                            print(1)
                            exit()
else:
    print(0)

Solution (Python):
X=int(input())
kari=X//100
if X>=100*kari and X<=105*kari:
    print(1)
    exit()
print(0)

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, 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
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

X = INT()

n, m = divmod(X, 100)

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

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

Solution (Python):
import sys
N=int(input())
a=N//105
b=N//100
for i in range(a,b+1):
  if 0<=N-i*100<=5*i:
    print("1")
    sys.exit()
print(0)

Solution (Python):
X = int(input())
dp = [False for _ in range(X+1)]
dp[0] = True
for x in range(X+1):
    if x > 99:
        item = [100, 101, 102, 103, 104, 105]
        for i in item:
            if dp[x-i]:
                dp[x] = True
if dp[X]:
    print(1)
else:
    print(0)

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

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

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

Solution (Python):
def main():
    x = int(input())
    cnt = x // 100
    m, M = cnt * 100, cnt * 105
    if m <= x <= M:
        print(1)
    else:
        print(0)

if __name__ == "__main__":
    main()

Solution (Python):
X=int(input())
if X>3000:
    print(1)
elif X<100:
    print(0)
else:
    i=1
    while i<=X:
        if 100*i<=X and 105*i>=X:
            print(1)
            quit()
        i+=1
    print(0)

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

i=0
while (i+1)*100 <= x:
  i+=1
  nokori = x-i*100
  num = ((nokori - 1) // 5) + 1 
  
  if num <= i:
    print(1)
    exit()
    
print(0)

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

for i in range(x):
    if 105 * i >= x >= 100 * i:
        print(1)
        exit()

print(0)

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

x_ = divmod(x, 100)

if 5*x_[0] >= x_[1]:
    print(1)
else:
    print(0)

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

Solution (Python):
x = int(input())
x_ = divmod(x, 100)
if 5 * x_[0] >= x_[1]:
    print(1)
else:
    print(0)

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

mod = X % 100
syou = X // 100

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

Solution (Python):
y = int(input())
dp = [0]*99
dp.insert(0,1)
if y >= 2000:
    print(1)
else:
    for x in range(100,y+1):
        if dp[x-100] == 1 or dp[x-101] == 1 or dp[x-102] == 1 or dp[x-103] == 1 or dp[x-104] == 1 or dp[x-105] == 1:
            dp.append(1)
        else:
            dp.append(0)

    print(dp[y])

Solution (Python):
x = int(input())
if x >= 2000:
    print(1)
else:
    c = x//100 + 1
    am = x%100
    for i in range(c):
        for j in range(c-i):
            for k in range(c-i-j):
                for l in range(c-i-j-k):
                    for m in range(c-i-j-l):
                        if am == i*5 + j*4 + k*3 + l*2 + m*1:
                            print(1)
                            exit()
    print(0)

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

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

ans = 0
x = X//100

X_bit2 = int(str(X)[-2:])
if X_bit2 <= x*5:
  ans = 1

print(ans)

Solution (Python):



x = int(input())
d, m = divmod(x, 100)

D = [0] * 5

for i in range(4, -1, -1):
  D[i], m = divmod(m, i + 1)

if d >= sum(D):
  print(1)
else:
  print(0)

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

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

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

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

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

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

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

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

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

n=1
while(100*n<=x):
    if(x<=105*n):
        print(1)
        sys.exit()
    n+=1
print(0)

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

for i in range(1, 100001):
    if 100*i <= X <= 105*i:
        print(1)
        exit(0)
print(0)

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

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

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>=0:
            dp[i] |= dp[i-j]

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

Solution (Python):
x = int(input())
a = x//100
b = x%100
l = list(range(1,6))[::-1]
i = 0
cnt = 0
while b > 0:
  if l[i] > b: i += 1
  cnt += b//l[i]
  b = b % l[i]
print(1 if cnt <= a else 0)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    x=int(input())
    a,b=divmod(x,100)
    if x<100:
        print(0)
    elif b<=a*5:
        print(1)
    else:
        print(0)
resolve()

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

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

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

Solution (Python):
x=int(input())
t,m=divmod(x,100)
if t*5>=m:print(1)
else:print(0)

Solution (Python):
n = str(input())
if len(n) <= 2:
    print(0)
else:
    a = n[0:-2]
    tens = int(n[-2])
    need = tens*2
    ones = int(n[-1])
    if ones == 0:
        need +=0
    elif ones <= 5:
        need += 1
    else:
        need +=2
    if need <= int(a):
        print(1)
    else:
        print(0)

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

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

Solution (Python):

import collections
import itertools as it
import math

 

x  = int(input())






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

Solution (Python):
import itertools
x = int(input())
k = x%100
n = x//100
ans = 0
if n*5>=k and n!=0:
    ans = 1
print(ans)

Solution (Python):


X = int(input())
N = 100000
k = 1
for i in range(N):
    if k*100 <= X <= k*105:
        print(1)
        exit()
    k += 1
print(0)

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

more_100 = X/100
under_100 = X%100
X2 = int(under_100 / 5)
X3 = under_100 % 5
if X3 != 0 and X2 + 1 <= more_100:
  print(1)
elif X3 == 0 and X2 <= more_100:
  print(1)
else:
  print(0)

Solution (Python):
def solve(target):
    n = int(target / 100)
    if n * 100 <= target <= n * 105:
        print(1)
    else:
        print(0)

solve(int(input()))

Solution (Python):
def one_int():
    return int(input())

N=one_int()
num=int(N/100) 
amari = N % 100
if num*5 < amari:
    print(0)
else:
    print(1)

Solution (Python):
X = int(input())
DP = [0]*100001
DP[100] = 1
DP[101] = 1
DP[102] = 1
DP[103] = 1
DP[104] = 1
DP[105] = 1

for i in range(106, 100001):
    if any([DP[i-100], DP[i-101], DP[i-102], DP[i-103], DP[i-104], DP[i-105]]):
        DP[i] = 1
print(DP[X])

Solution (Python):
X = int(input())
flag = 1
if X < 100:
  flag = 0
else:
  a = X%100
  b = a%10
  c = (a-b)/10
  count = 2*c
  if 1 <= b <= 5:
    count += 1
  elif 6<= b <= 9:
    count += 2
  if X//100 < count:
    flag = 0
print(flag)

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

x = X % 100
tmp = (x // 5) * 105
if x % 5 != 0:
    tmp += 100 + (x % 5)
if tmp > X:
    print(0)
else:
    print(1)

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

output = []
for c in range(C):
    if (c*100) <= X <= (c*105):
        output.append(1)
    else:
        output.append(0)
if max(output):
  print("1")
else:
  print("0")

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

c = x//100

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

Solution (Python):
X = int(input())
N = X//100
X %=100
if N == 0:
    print(0)
    exit()
if X == 0:
    print(1)
    exit()
for i in [5,4,3,2,1]:
    for j in range(N,0,-1):
        if X//(i*j) > 0:
            N -= j
            X %= i*j
            break
    if N == 0:
        break
if X == 0:
    print(1)
else:
    print(0)

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

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

Solution (Python):
import itertools
x = int(input())
count = 0
coins = [ 100, 101 , 102 , 103 , 104 , 105]
for i in itertools.combinations_with_replacement(coins, x // 100):
  if sum(i) == x:
    count = 1
    break
print(count)

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

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

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

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

if X >= 2000:
    print(1)
elif X < 100:
    print(0)
else:
    limit, mods = divmod(X, 100)
    if mods / limit <= 5:
        print(1)
    else:
        print(0)

Solution (Python):

import sys

import fractions
import copy
import bisect
import math
import numpy as np
import itertools
from itertools import combinations_with_replacement


from operator import itemgetter
from sys import stdin

from operator import mul
from functools import reduce
from collections import Counter





j=0
k=0
n=3
r=1
a=[0]






"1行1つの整数を入力を取得し、整数と取得する"




"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

for i in number_list:
    print(number_list[i-1])

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''



"正方行列にstr型の値を入力"
'''




'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"


'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''











'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''




"aという変数に入っているものを大文字にして出力"

















'''
コンビネーションの組み合わせの中身を出力する形式
for i in itertools.combinations(brray, 2)
combinationsをpermutationsにすれば順列になる
今回なら(abc133B)
入力
1 2
5 5
-2 8
出力
[[1, 2], [5, 5], [-2, 8]]
もちろん一次元リストでも使えるし
何よりiもリストのように使えるので便利
'''


'''
def cmb(n,r):
    
    r= min(n-r,r)
    
    if r == 0: return 1
    over = reduce(mul, range(n, n-r, -1))
    
    
    

    under = reduce(mul, range(1, r+1))
    
    
    
    

    return over // under
    
    
    
    
a = cmb(n, r)

'''

'''
import itertools
from itertools import combinations_with_replacement

combinationについて
以下の違いを意識しよう
combinations() p, r 長さrのタプル列、ソートされた順で重複なし

combinations_with_replacement() p, r 長さrのタプル列、ソートされた順で重複あり


使用例 　　　　　　　　　　　                  出力　　
combinations('ABCD', 2)　　　　　　　　　　　　AB AC AD BC BD CD

combinations_with_replacement('ABCD', 2)　　 AA AB AC AD BB BC BD CC CD DD
'''



'''




for i in a.most_common(n):print(i)





 


'''









'''
bisect.bisect_left(a, x, lo=0, h=len(a))
引数
a: ソート済みリスト
x: 挿入したい値
lo: 探索範囲の下限
hi: 探索範囲の上限
(lo, hiはスライスと同様の指定方法)
bisect_leftはソートされたリストaに対して順序を保ったままxを挿入できる箇所を探索します。leftが示す通り、aにすでにxが存在している場合は、挿入箇所は既存のxよりも左側になります。また、lo, hiを指定することで探索範囲を絞り込むことも可能です。デフォルトはaの全体が探索対象です。
'''

'''
素数の判定
'''


def is_prime(n):
    if n == 1: return False

    for k in range(2, int(np.sqrt(n)) + 1):
        
        if n % k == 0:
            return False
            
    return True


'''
npのmaxとmaximumの違い
xs = np.array([1, -2, 3])
np.max(xs, 0)
この出力は3となります．[1, -2, 3]と0の4つの数字のうち，最も大きい値を出力します．

一方で，[max(1, 0), max(-2, 0), max(3, 0)]を出力したい時があります．
その時は，numpyのmaximum関数を用います．

xs = np.array([1, -2, 3])
np.maximum(xs, 0)  

'''

def factorial(x, mod=10**9+7):
    
    
    
    tmp = 1
    for i in range(1, x+1):
        tmp = (tmp * i) % mod
    return tmp
    '''
    Basically, when you do a**d % n, you actually have to calculate a**d, which could be quite large.
    But there are ways of computing a**d % n without having to compute a**d itself, and that is what pow does.
    '''











def main():

    steps=0
    state=0
    w=1
    j=0
    k=0
    x=int(input())
    
    q=x//100
    mod=x%100
    if 5*q >= mod:
        print(1)
        sys.exit()
    print(0)
    
    
    
    




    
        
    
    

    
    
    
    
    DP = np.zeros(w+1, dtype=int)
    exdp=np.zeros((3,4)) 
    
    
    
        
        
    
    
        
        
    


    "1行1つの整数を入力を取得し、整数と取得する"
    
    
    "12 21 332 とか入力する時に使う"
    "1行に複数の整数の入力を取得し、整数として扱う"
    
    



    '''
    入力
    1234
    出力
    [1, 2, 3, 4]
    '''
    pin_l=["x" for i in range(10)]
    

    ls = ["a", "b", "c", "d", "e"]


    
    

    
    

    
    
    
    
    
    '''
    lsというリストの場合に、1つ飛びの値を取得したい場合には
    ls[::2]
    のようにします。こうすると、
    ["a", "c", "d"]と出力される
    '''

if __name__ == "__main__":
    main()

Solution (Python):
x = input()
x = '000'+x
z = x[:-2]
y = x[-2:]
s = 0
z = int(z)
y = int(y)
L = []
y1 =y//5
if z>=20 or z>=(y1+(y%5!=0)):
    print(1)
    exit()
print(0)

Solution (Python):
x = input()
x = '000'+x
z = x[:-2]
y = x[-2:]
s = 0
z = int(z)
y = int(y)
L = []
for i in range(1,21):
    s +=5
    if s>=y and z>=i:
        print(1)
        exit()
if z>=20:
    print(1)
    exit()
print(0)

Solution (Python):
x = int(input())
y = x % 100
z = (y // 5) + ((y % 5) // 4) + ((y % 5 % 4) // 3) + ((y % 5 % 4 % 3) // 2) + (y % 5 % 4 % 3 % 2)
if x // 100 >= z:
    print(1)
else:
    print(0)

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

mod = x%100
quo = x//100



if mod==0:
  print("1")
elif quo>=math.ceil(mod/5):
  print("1")
else:
  print("0")

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

for i in range(X//100 + 1):
    if 100*i <= X <= 105*i:
        print("1")
        exit()

print("0")

Solution (Python):


x = int(input())

n = x // 100
m = x % 100
c = 0
for i in range(1, 6)[::-1]:
    c += m // i
    m %= i
if c <= n:
    print(1)
else:
    print(0)

Solution (Python):
A=int(input())
can_max=105
can_min=100
while A > can_max:
    can_max+=105
    can_min+=100
    if can_min<=A<=can_max:
        print(1)
        exit()
if can_min<=A<=can_max:
    print(1)
    exit()
print(0)

Solution (Python):
def solve(X:int) -> int:
    if(X < 100):return 0
    first = int(str(X)[-1])
    seccond = int(str(X)[-2])
    ans = 0
    if(first >= 6):
        ans += first + 200
    elif(first > 0):
        ans += first + 100
    ans += (seccond * 2) * 105
    return 1 if(ans <= X) else 0


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

if __name__ == "__main__":
    main()

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

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

n = x //100
h = x % 100

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

Solution (Python):
import sys

input = sys.stdin.readline


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

    if X < 100:
        ans = 0
    else:
        q, r, = divmod(X, 100)
        if r <= 5 * q:
            ans = 1
        else:
            ans = 0

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
x = int(input())
tmp = []
for j in range(1,20):
    a = [i for i in range(100*j,105*j)]
    tmp=tmp+a

for k in range(1,20):
    b = 105*k
    tmp.append(b)

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

Solution (Python):
'''
参考
https://penyoo.hatenablog.com/entry/2019/12/02/045335
X を 「X//100=a…購入商品数」と「X%100=b…端数」の2つに分けて考える
※商品の価格が「100～105（100+0～100+5）」になっているため
a、bについて
    b//5!=0の場合
        b//5+1<=a
    b//5==0の場合
        b//5<=a
が成立すれば、買い物ができる

例1：X=617円の場合⇒買い物可能
a=X//100==6     b=X%100==17     b//5+1==4<=a
例2：X=489円の場合⇒買い物不可
a=X//100==4     b=X%100==89     b//5+1==18>a
'''
X = int(input())
purchase_count = X // 100
surplus = X % 100
tmp = surplus // 5

if surplus % 5 != 0:
    tmp += 1

if purchase_count >= tmp:
    print(1)
else:
    print(0)

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

for i in range(x):
  if x >= 100*i and x <= 105*i:
    print(1)
    break
else:
  print(0)

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

Solution (Python):
def main():
    X=int(input())
    flag=0
    for i in range(1,1001):
        if 100*i<=X<=105*i:
            flag=1
    print(flag)

main()

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    x=int(input())
    mai,y=divmod(x,100)
    if 5*mai>=y and x>=100:
        ans=1
    else:
        ans=0
    print(ans)
resolve()

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

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

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










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

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

def main():
    X = int(input())
    dp = [False] * (X+1)
    
    
    MENU = [100,101,102,103,104,105]
    dp[0] = True 
    for i in range(X):
        for v in MENU:
            if i + 1 - v < 0:
                continue
            dp[i+1] |= dp[i+1-v]
    print(1 if dp[X] else 0)
if __name__ == '__main__':
  main()

Solution (Python):
import sys
sys.setrecursionlimit(1000000)
X = int(input())
items = (100, 101, 102, 103, 104, 105)
seen = set()
def dfs(n):
    if(n>100000):
        return 0
    if(n not in seen):
        seen.add(n)
        for i in items:
            dfs(n+i)

dfs(0)
if(X in seen):
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
lst = []
for a in range(2):
    for b in range(2):
        for c in range(2):
            for d in range(2):
                for e in range(2):
                    for f in range(2):
                        lst.append(100*a + 101*b + 102*c + 103*d + 104*e + 105*f)
ans = 0
for n in lst[1:]:
    tmp = x % n
    if tmp in lst:
        ans = 1
        break

print(ans)

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

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

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

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

if x>= 105*20:
  print(1)
  exit()
  
  
dp = [0 for i in range(x+1)]
dp[0]= 1

for i in range(x):
  if dp[i]== 1:
    for  j in range(100,105+1):
      if i+j<= x:
        dp[i+j] = 1
print(dp[x])

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

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

r, q = x // 100, x % 100



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

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

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

Solution (Python):
x=int(input())
a=x%100
cnt = (a+4)//5

if x//100 >= cnt:
    print(1)
else:
    print(0)

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

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

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

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

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

Solution (Python):
import sys

def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))

def DD2(d1,d2,init=0): return [[init]*d2 for _ in range(d1)]
def DD3(d1,d2,d3,init=0): return [DD2(d2,d3,init) for _ in range(d1)]

def to_bin(x: int) -> str: return format(x, 'b') 
def to_oct(x: int) -> str: return format(x, 'o') 
def to_hex(x: int) -> str: return format(x, 'x') 
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i):
            is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]

from itertools import accumulate as acc
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left



def main():
    x = II()
    n = x//100
    m = set([i for i in range(100*n, (105*n)+1)])
    if x in m:
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()

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

num = X // 100

cent = X - 100 * num

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

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

Solution (Python):


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

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

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

Solution (Python):
x = input()
y = int(x)
if y < 100:
    print(0)
else:
    ans = 0
    i = int(x[:len(x)-2])
    if 100*i <= y and y <= 105*i:
        ans = 1
    print(ans)

Solution (Python):
x = input()
y = int(x)
if y < 100:
    print(0)
else:
    ans = 0
    c = int(x[:len(x)-2])
    for i in range(1,c+1):
        if 100*i <= y and y <= 105*i:
            ans = 1
            break
    print(ans)

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

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

Solution (Python):
import sys

x = int(input())
for i in range(x):
    if i * 100 <= x <= i * 105:
        print(1)
        sys.exit()

print(0)

Solution (Python):
X = int(input())
def hoge(X):
    if ((X%100)%5) > 0:
        if 1+ ((X%100)//5) <= X//100:
            return 1
        else:
            return 0
    else:
        if ((X%100)//5) <= X//100:
            return 1
        else:
            return 0
print(hoge(X))

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

Solution (Python):
X = int(input())
a = [100, 101, 102, 103, 104, 105]
dp = [[False]*100010 for _ in range(10)]
dp[0][0] = True

for i in range(6):
    for j in range(X+1):
        dp[i+1][j] |= dp[i][j]
        if j >= a[i]:
            dp[i+1][j] |= dp[i][j-a[i]]
            dp[i+1][j] |= dp[i+1][j-a[i]]
if dp[6][X]:
    print(1)
else:
    print(0)

Solution (Python):
X = int(input())
a = [100, 101, 102, 103, 104, 105]
dp = [[False]*100010 for _ in range(10)]
dp[0][0] = True

for j in range(X+1):
    for i in range(6):
        dp[i+1][j] |= dp[i][j]
        if j >= a[i]:
            dp[i+1][j] |= dp[i][j-a[i]]
            dp[i+1][j] |= dp[i+1][j-a[i]]
if dp[6][X]:
    print(1)
else:
    print(0)

Solution (Python):
import sys
X = int(input())
if 1 <= X and X < 100:
    print("0")
    sys.exit()
i = 0
dp = [0]*(X+1)
dp[0] = 1
for i in range(100, X+1):
    for j in range(6):
        if dp[i-(100+j)] == 0:
            pass
        else:
            dp[i] = 1
print(dp[X])

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

Solution (Python):
sum = input()

if len(sum) < 3:
    print('0')
else:
    last_2_digit = sum[-2:]
    upper_digit = sum[:-2]

    if last_2_digit == '00':
        print('1')
    else:
        required_num = (int(last_2_digit) - 1) // 5 + 1
        
        if int(upper_digit) >= required_num:
            print('1')
        else:
            print('0')

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

x_ = x%100

t = 0
a = 5
while x_ != 0:
    t += x_//a
    x_ -= (x_//a)*a
    a -= 1


if x//100 >= t:
    print(1)
else:
    print(0)

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










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

def readInts():
  return list(map(int,input().split()))
def main():
    X = int(input())
    
    quo = X//100
    mo_ = X % 100
    
    if 0 <= mo_ <= 5*quo:
        print(1)
    else:
        print(0)

    
if __name__ == '__main__':
  main()

Solution (Python):
import sys
import time
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    X = int(readline())
    top = X //100
    bottom = (X%100+4)//5
    if top>=bottom:
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    X = int(input())
    menu = [100, 101, 102, 103, 104, 105]
    x_list = [False] * (X + 1)
    x_list[0] = True
    for i in range(X + 1): 
        if x_list[i] is True:
            for yen in menu:
                if i + yen <= X:
                    x_list[i + yen] = True
    if x_list[X] is True:
        print('1')
    else:
        print('0')


if __name__ == '__main__':
    main()