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())
print(1 if x%100<=x//100*5 else 0)

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

Solution (Python):
import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7

import sys
sys.setrecursionlimit(10**6)
import itertools
import bisect
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    X = i_input()

    Y = X//100
    L = []
    a = [0,1,2,3,4,5]
 
    for i in range(1,min(20,Y)+1):
        c = list(itertools.combinations_with_replacement(a, i))
        for i in c:
            L.append(sum(i))
    Z = X%100
 
    if Z in L:
        print(1)
    else:
        print(0)


  
if __name__=="__main__":
    main()

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

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

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

if x >= 2000:
    print(1)
    exit()
    
for i in range(1, 20):
    if (100 * i <= x) and (x <= 105 * i):
        print(1)
        exit()
print(0)

Solution (Python):
X = int(input())
for i in range(1, 10**10):
  if 100*i <= X <= 105*i:
    print(1)
    break
  elif X < 100*i:
    print(0)
    break

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

if x%100 == 0 or x%101 == 0 or x%102 == 0 or x%103 == 0 or x%104 == 0 or x%105 == 0:
    print (1)
else:
    for i in range(100000):
        if 100*i <= x <= 105*i:
            print (1)
            exit ()
    else:
        print (0)

Solution (Python):


X = int(input())

num = X // 100
if num*100 <= X and X<=num*105:
    print("1")
else:
    print("0")

Solution (Python):


X = int(input())

num = X // 100
reminder = X % 100
if reminder == 0:
    print("1")
    exit()

for i in range(num+1):
    for j in range(num+1):
        if i+j > num:
            continue
        for k in range(num+1):
            if i+j+k > num:
                continue
            for l in range(num+1):
                if i+j+k+l>num:
                    continue
                for m in range(num+1):
                    if i+j+k+l+m>num:
                        continue

                    res = i*1+j*2+k*3+l*4+m*5
                    if res == reminder:
                        print("1")
                        exit()

print("0")

Solution (Python):
DP = [False]*100001
DP[0] = True
for TN in range(0,100001):
    if TN>=100 and DP[TN-100]:
        DP[TN] = True
        continue
    if TN>=101 and DP[TN-101]:
        DP[TN] = True
        continue
    if TN>=102 and DP[TN-102]:
        DP[TN] = True
        continue
    if TN>=103 and DP[TN-103]:
        DP[TN] = True
        continue
    if TN>=104 and DP[TN-104]:
        DP[TN] = True
        continue
    if TN>=105 and DP[TN-105]:
        DP[TN] = True
        continue
print([0,1][DP[int(input())]])

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

count = 1
while True:
  if 100*count <= X <= 105*count:
    print(1)
    exit()
  elif X < 100*count:
    print(0)
    exit()
  count += 1

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

can = x // 100
need = ((x%100) + 4) // 5

print(1 if can >= need else 0)

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

Solution (Python):

import sys
input=sys.stdin.readline

def main():
    X = int(input())
    C = X // 100
    if X >= C * 100 and X <= C * 105:
        print(1)
    else:
        print(0)

if __name__=="__main__":
    main()

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

if X < 106:
  if 100 <= X <= 105:
    print(1)
    exit()
  else:
    print(0)
    exit()



for i in range(100,106):
  dp[i] = True

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

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

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

for i in range(1,c+1):
    if 100*i<=x<=105*i:
        print(1)
        exit()
else : print(0)

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

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

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

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

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

Solution (Python):



def main():
    X = int(input())
    C = X // 100
    print([0, 1][X >= C * 100 and X <= C * 105])


if __name__ == "__main__":
    main()

Solution (Python):



x = int(input())
dp = [False for _ in range(x+1)]
dp[0] = True

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

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

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

Solution (Python):


x = int(input())

n = x//100

for i in range(n+1):
    tmp = x 
    tmp -= i*100
    if 5*i >= tmp:
        print(1)
        exit()
print(0)

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

Solution (Python):
n=int(input())
dp=[0]*(n+120)
dp[100]=1
dp[101]=1
dp[102]=1
dp[103]=1
dp[104]=1
dp[105]=1

for i in range(100,n+1):
    if not dp[i]: continue
    dp[i+100:i+106]= [1]*6
print(dp[n])

Solution (Python):
x = int(input())
d = x%100
c = 0
for i in [5,4,3,2,1]:
    c += d//i
    d = d%i
if c*100 + x%100 > x:
    print(0)
else:
    print(1)

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

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

for i in range(X + 1):
    dp[i + 100] = max(dp[i], dp[i + 100])
    dp[i + 101] = max(dp[i], dp[i + 101])
    dp[i + 102] = max(dp[i], dp[i + 102])
    dp[i + 103] = max(dp[i], dp[i + 103])
    dp[i + 104] = max(dp[i], dp[i + 104])
    dp[i + 105] = max(dp[i], dp[i + 105])

print(dp[X])

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

x = int(input())

def cond(x):
    q, r = x // 100, x % 100
    q5, r5 = r // 5, r % 5
    if r5 == 0:
        return q >= q5
    else:
        return q >= q5 + 1

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

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

ns=X//105
ne=X//100


ans=0
for i in range(ns, ne+1):
    if 100*i<=X<=100*i+5*i:
        ans=1
        break
print(ans)

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

b = X // 100

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

Solution (Python):
import math

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

Solution (Python):
x = int(input())
dp = [False]*101000
dp[0] = True
l = [100, 101, 102, 103, 104, 105]
for i in range(100001):
  for j in l:
    if dp[i]:
      dp[i+j] = True
if dp[x]:
  print(1)
else:
  print(0)

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

if __name__ == "__main__":
    main()

Solution (Python):



import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """615"""
        output = """1"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """217"""
        output = """0"""
        self.assertIO(input, output)


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

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


if __name__ == "__main__":
    
    resolve()

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

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

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

num = X // 100 + 1
calc = X % 100

for a in range(num):
    for b in range(num - a):
        for c in range(num - a - b):
            for d in range(num - a - b - c):
                for e in range(num - a - b - c - d):
                    for f in range(num - a - b - c - d - e):
                        if calc == 0*a + 1*b + 2*c + 3*d + 4*e + 5*f:
                            print(1)
                            exit()


print(0)

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

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

if __name__ == "__main__":
    solve()

Solution (Python):




def resolve():
    import sys
    input = sys.stdin.readline

    x = int(input().rstrip())

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


if __name__ == "__main__":
    resolve()

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

if 1<=X<100 or 106<=X<200 or 211<=X<300 or 316<=X<400 or 421<=X<500 or 526<=X<600 or 631<=X<700 or 736<=X<800 or 841<=X<900 or 946<=X<1000 or 1051<=X<1100 or 1156<=X<1200 or 1261<=X<1300 or 1366<=X<1400 or 1471<=X<1500 or 1576<=X<1600 or 1681<=X<1700 or 1786<=X<1800 or 1891<=X<1900 or 1996<=X<2000:
    print(0)
else:
    print(1)

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

n = X//100

if X in range(n*100,n*105+1):
  print(1)
else:
  print(0)

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

Solution (Python):

X = int(input())

dp = [0]*(100010)
lst = [100,101,102,103,104,105]
for i in range(100,106):
    dp[i] = 1


for v in range(100,X+1):
    for w in range(6):
        n = lst[w]
        if dp[v-n] == 1:
            dp[v] = 1
print(dp[X])

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

Solution (Python):
x = int(input())
dp = [0]*(x + 105 + 1)
dp[100] = 1 
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

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

print(dp[x])

Solution (Python):
x = int(input())
dp = [0]*(x + 105 + 1)
dp[100] = 1 
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

for i in range(100,x-105+6):
    for j in range(100,106):
        dp[i+j] = max(dp[i] , dp[i+j])

print(dp[x])

Solution (Python):
x = int(input())
dp = [0]*(x + 105 + 1)
dp[100] = 1 
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

for i in range(100,x-105+12):
    for j in range(100,106):
        dp[i+j] = max(dp[i] , dp[i+j])

print(dp[x])

Solution (Python):
x = int(input())
dp = [0]*(x + 105 + 1)
dp[100] = 1 
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

for i in range(100,x-105+25):
    for j in range(100,106):
        dp[i+j] = max(dp[i] , dp[i+j])

print(dp[x])

Solution (Python):
x = int(input())
dp = [0]*(x + 105 + 1)
dp[100] = 1 
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

for i in range(100,x-105+25):
    for j in range(100,106):
        dp[i+j] = max(dp[i] , dp[i+j])

print(dp[x])

Solution (Python):
x = int(input())
dp = [0]*(x + 105 + 1)
dp[100] = 1 
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

for i in range(100,x-105+50):
    for j in range(100,106):
        dp[i+j] = max(dp[i] , dp[i+j])

print(dp[x])

Solution (Python):
x = int(input())
dp = [0]*(x + 105 + 1)
dp[100] = 1 
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

for i in range(100,x-105+100):
    for j in range(100,106):
        dp[i+j] = max(dp[i] , dp[i+j])

print(dp[x])

Solution (Python):
x = int(input())
dp = [0]*(x+105+1)
dp[100] = 1 
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

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

print(dp[x])

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

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

Solution (Python):
x = int(input())
a = x % 100
b = x // 100
cnt = 0
ans = 0

for i in [5,4,3,2,1]:
    cnt += a // i
    a %= i
    
if cnt <= b:
    ans = 1
    
print(ans)

Solution (Python):
x = int(input())
cx = int(x/100)
dx = x%100
while cx>0:
    cx-=1
    if dx>5:
        dx-=5
    else:
        print(1)
        exit()
print(0)

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

    n = x // 100

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


if __name__ == "__main__":
    main()

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

    for i in range(x + 1):
        if 0 <= x - 100 * i <= 5 * i:
            print(1)
            exit()
    else:
        print(0)


if __name__ == "__main__":
    main()

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

    a_100 = x // 100
    b_100 = x % 100
    a_5 = b_100 // 5
    b_5 = b_100 % 5
    a_4 = b_5 // 4
    b_4 = b_5 % 4
    a_3 = b_4 // 3
    b_3 = b_4 % 3
    a_2 = b_3 // 2
    b_2 = b_3 % 2
    a_1 = b_2 // 1
    b_1 = b_2 % 1

    if a_5 + a_4 + a_3 + a_2 + a_1 > a_100:
        ans = 0
    else:
        ans = 1

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

    dp = [0] * 100100
    dp[0] = 1
    for p in range(100, 106):
        for i in range(len(dp)):
            if dp[i] == 1 and i + p < len(dp):
                dp[i + p] = 1

    print(dp[X])


def main():
    solve()


if __name__ == '__main__':
    main()

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

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

Solution (Python):
x = input()
if len(x) < 3:
    print(0)
    exit()
k = int(x[0:-2])
x = int(x[-2:])

k -= x / 5
if x % 5 == 0 and k >= 0:
    print(1)
elif k > 0:
    print(1)
else:
    print(0)

Solution (Python):
x = int(input())
li = [0]*100105
li[0] = 1
for i in range(x):
    if li[i] == 1:
        for j in range(6):
            li[i+j+100] = 1
print(li[x])

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

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

Solution (Python):
import itertools
a = [0, 1, 2, 3, 4, 5]
x = int(input())
n = x // 100
m = x % 100
for c in itertools.combinations_with_replacement(a, n):
    if sum(c) == m:
        print(1)
        break
else:
    print(0)

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

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

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

n = x // 100
a = x % 100

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

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

p = X % 100
q = p // 5
r = p % 5
ans = q
if r > 0:
    ans += 1
ans = ans * 100 + p
if X >= ans:
    print(1)
else:
    print(0)

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

count = X // 100
mod = X % 100

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

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

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

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

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

Solution (Python):
X = int(input())
c, r = 0, X % 100
for d in range(5, 0, -1):
    c += r // d
    r = r % d
if c > X // 100:
    print(0)
else:
    print(1)

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

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

q,mod = divmod(X,100) 



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

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

dp = [0]*200000
for j in range(6):
  dp[100+j] += 1

def max_sum():
  global dp
  for i in range(x):
    if dp[i] > 0:
      for j in range(6):
        dp[i+100+j] += 1
  return


max_sum()
print(min(dp[x], 1))

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())

X = I()
q,r = X//100,X%100
if q*5 >= r:
    print(1)
else:
    print(0)

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

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

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


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

x = I()
y = x // 100
z = x % 100
if 0 <= z <= 5*y:
    print(1)
else:
    print(0)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()


def solve():
    x = ini()
    lb, ub = 0, 0
    while lb <= x:
        if lb <= x <= ub:
            return True
        lb += 100
        ub += 105
    return False


print(1 if solve() else 0)

Solution (Python):
X=int(input())
i=0
while True:
    if 100*i<=X and X<=105*i:
        print(1)
        exit()
    elif 105*i<X and X<100*(i+1):
        print(0)
        exit()
    i+=1

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

Solution (Python):
import itertools as it
N=int(input())
S=[0,1,2,3,4,5]
for k in range(N//100):
  for i in it.combinations_with_replacement(S,N//100):
    if sum(i)==N%100:
      print("1")
      exit()
print("0")

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

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

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

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

Solution (Python):
X = int(input())
N = X // 100
for n in range(N + 1):
  M = X - n * 100
  if M > n * 5:
    continue
  else:
    print(1)
    break
else:
  print(0)

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

flag = 0
if x >= 2000:
    print(1)
    exit()
else:
    for i in range(20):
        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 i*100+j*101+k*102+l*103+m*104+n*105 == x:
                                flag = 1
                                print(1)
                                exit()
if flag != 1:
    print(0)

Solution (Python):
n = int(input())
a = n // 100
b = n % 100
check = a > 20 or b / 5 <= a
print("1" if check else "0")

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

x=I()
a=x%100
b=x//100
if a>b*5:
    print("0")
else:
    print("1")

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

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

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

l = -(-x//105)
h = x//100


for i in range(l,h+1):
    for b in range(0,i+1):
        for c in range(0,i+1):
            for d in range(0,i+1):
                for e in range(0,i+1):
                    if x - (i*100 + 1*b+2*c+3*d+4*e+5*(i-b-c-d-e)) == 0:
                            print('1')
                            exit()
else:
    print('0')

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

l = -(-x//105)
h = x//100
fix = l*100

for b in range(0,h+1):
    for c in range(0,h+1):
        for d in range(0,h+1):
            for e in range(0,h+1):
                for f in range(0,h+1):
                    if fix + 1*b+2*c+3*d+4*e+5*f==x:
                        print('1')
                        exit()
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):
num=(int)(input())
n=num//100
amari=num%100
if num <= 99 or amari / n > 5:
  print(0)
else:
  print(1)

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

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

price = [100,101,102,103,104,105]
dp = [[0]*100001 for _ in range(6)]

dp[0][0] = 1
for i in range(100,100001):
    dp[0][i] = dp[0][i-100]

for i in range(1,6):
    for j in range(price[i]):
        dp[i][j] = dp[i-1][j]
    for j in range(price[i],100001):
        dp[i][j] = max(dp[i-1][j],dp[i][j-price[i]])

print(dp[-1][X])

Solution (Python):
import collections
import sys
import math
X=int(input())
if X<100:
    print("0")
    sys.exit()
amari=math.floor(X/100)
kake=amari*5
if amari*100<=X<=amari*100+kake:
    print("1")
else:
    print("0")

Solution (Python):
from itertools import combinations_with_replacement as C

X = int(input())
mono = [100, 101, 102, 103, 104, 105]
ans = 0
if X >= 2000:
    ans = 1
else:
    for i in range(1, 19 + 1):
        L = list(C(mono, i))
        for L in L:
            if sum(L) == X:
                ans = 1
                break

print(ans)

Solution (Python):
X = int(input())
for i in range(105, 100, -1):
    while True:
        if X % 100 < (X-i) % 100:
            break
        else:
            X = X-i
if X < 0: X = 1
print(1 if X % 100 == 0 else 0)

Solution (Python):
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

x = inint()

res = x % 100
lim = x//100

c = res//5
res %= 5
c += res//4
res %= 4
c += res//3
res %= 3
c += res//2
res %= 2
c += res//1
res %= 1

if lim < c:
    print(0)
else:
    print(1)

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

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

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

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

items = [100, 101, 102, 103, 104, 105]
for i in items:
    for j in range(x + 1):
        if j + i >= x + 1:
            break
        dp[j + i] |= dp[j]
if dp[x]:
    print(1)
else:
    print(0)

Solution (Python):
s = int(input())
a = s%100
b = s//100

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

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

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

for c in range(1, 1000001):
  if c * 100 <= X and X <= c * 105:
    ans = 1
    break
  else:
    ans = 0

print(ans)

Solution (Python):
x = int(input())
dp = [0] * 100200
dp[100] = 1
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

for i in range(100, x+1):
    for p in [100, 101, 102, 103, 104, 105]:
        dp[i+p] = max(dp[i], dp[i+p])

print(dp[x])

Solution (Python):
x = int(input())
c = 1
while True:
    if c*100 <= x <= c*105:
        print(1)
        break

    if c*100 > x:
        print(0)
        break
    c += 1

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

dp=[[0]*(x+1) for _ in range(7)]
dp[0][0]=1
price=list(range(100,106))

for i in range(6):
    p=price[i]
    for j in range(x+1):
        dp[i+1][j]=dp[i][j]

        if j>=p:
            dp[i+1][j]+=dp[i+1][j-p]

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

Solution (Python):

X = int(input())

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

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

Solution (Python):

X = int(input())

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

Solution (Python):

X = int(input())

n = X % 100
m = X // 100

cnt = 0
for a in reversed(range(1, 6)):
    while n - a >= 0:
        n -= a
        cnt += 1

if cnt <= m:
    print(1)
else:
    print(0)

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

ans=[0]*2100
for a in range(22):
  for b in range(22):
    for c in range(22):
      for d in range(22):
        for e in range(22):
          for f in range(21):
            y=a*100+b*101+c*102+d*103+e*104+f*105
            if y<=2099:
              ans[y]=1
            
print(ans[x])

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

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

x1 = X // 100
x2 = X % 100

if x2 <= x1 * 5:
    print(1)
else:
    print(0)

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

if x >= 2600:
    print(1)
    exit()

cnt = 0
for i in range(0, 25):
    for v in itertools.combinations_with_replacement([100, 101, 102, 103, 104, 105], i):
        if sum(v) == x:
            print(1)
            exit()
print(0)

Solution (Python):
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    x = int(input())
    dp = [0 for _ in range(x+106)]
    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])
    return 0

if __name__ == "__main__":
    solve()

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

X = int(input())

costs = [105, 104, 103, 102, 101, 100]
for x in range(X):
    if 100 * x <= X <= 105 * x:
        print(1)
        quit()
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 math
x=int(input())
y=x//100
z=math.ceil((x%100)/5)
if y >= z:
  print(1)
else:
  print(0)

Solution (Python):

import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from scipy.special import comb
import copy
sys.setrecursionlimit(10**6)


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


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


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


X = z()
lis = list(range(100, 106))

max_num_item = int(X / 100)
min_num_item = int(X / 105)

for num_item in range(min_num_item, max_num_item + 1):
    tmp_x = X
    tmp_x = tmp_x - 100 * num_item
    if (tmp_x <= num_item * 5):
        print(1)
        exit()
print(0)

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
from math import ceil

x=ni()
p=x%100
if ceil(p/5) <= x//100:
  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=int(input())
if x>=10000 or x//100*5>=x%100:
    print(1)
else:
    print(0)

Solution (Python):
def resolve():
    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])
resolve()

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

Solution (Python):
X=int(input())
han=0
for a in range(1001):
    if a * 100 > X:
        break
    for b in range(1001-a):
        if a * 100 + b * 101 > X:
            break
        for c in range(1001-a-b):
            if a * 100 + b * 101 + c * 102 > X:
                break
            for d in range(1001-a-b-c):
                if a * 100 + b * 101 + c * 102 + 103 * d> X:
                    break
                for e in range(1001-a-b-c-d):
                    if a * 100 + b * 101 + c * 102 + 103 * d + 104 * e>X:
                       break
                    for f in range(1001-a-b-c-d-e):
                        if a * 100 + b * 101 + c * 102 + 103 * d + 104 * e + 105 * f>X:
                            break
                        if a*100+b*101+c*102+103*d+104*e+105*f==X:
                            print("1")
                            han=1
                            exit()

if han==0:
    print(0)