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.



Sample input:
615


Sample output:
1

Submission status: Accepted

Solution code:

x = int(input())

price = x%100
num = x//100
num_list = [5,4,3,2,1]

result = 0
for i in num_list:
    result += price//i
    price %= i


if result <= num:
    ans = 1
else:
    ans = 0

print(ans)

Submission status: Accepted

Solution code:
n=int(input())
if n<=99:
    print(0)
    exit()
if n>=2000:
    print(1)
    exit()
if n//100*5>=n%100:
    print(1)
else:print(0)

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
x=int(input())
n=x%100
if n==0:
    print(1)
else:
    if x//100>(n-1)//5:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
X = int(input()) # 数字を変数に格納

X_2 = int(X / 100)
X_2_rest = X % 100

X_3 = int(X_2_rest / 5)
X_3_rest = X % 5

if X_3_rest > 0:
    X_4 = 1
else:
    X_4 = 0

if X_2 >= (X_3 + X_4):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 8)


def dp(x, memo={}):
    if x in memo:
        return memo[x]
    if x in products:
        return True
    elif x == 0:
        return True
    elif x < 0:
        return False
    res = any(dp(x - p, memo) for p in products)
    memo[x] = res
    return res


x = int(input())
products = {100, 101, 102, 103, 104, 105}
if dp(x):
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
x = int(input())

if (x - 1) // 105 != x // 100:
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
X = int(input())

# 100の位以上の数字Yと、
# 100で割った余りXmodを求める
Y = int(X // 100)
Xmod = X % 100

# Xmod <= 5*Y なら、買い方が存在する
if Xmod <= 5*Y:
  print(1)
else:
  print(0)

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
X = int(input())

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

Submission status: Accepted

Solution code:
import sys
X = int(input())
M = int(X/100)
D = X % 100

if M >= 20:
  print(1)
  sys.exit()
else:
  for a in range (0,M+1):
    for b in range (0,M+1-a):
      for c in range (0,M+1-a-b):
        for d in range (0,M+1-a-b-c):
          for e in range (0,M+1-a-b-c-d):
            s = 1 * a + 2 * b + 3 * c + 4 * d + 5 * e
            if s == D:
              print(1)
              sys.exit()
print(0)

Submission status: Accepted

Solution code:
X = int(input())
r = X//100
s = X % 100
if s > 5*r:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:


def main():
    x=int(input())
    dp=[0 for i in range(x+1000)]
    for i in range (100,106):
        dp[i]=1

    for i in range(x):
        if dp[i]==1:
            for j in range (100,106):
                dp[i+j]=1
    print(1 if dp[x]==1 else 0)


 
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X = int(input())
A = X // 100
B = X % 100
Ans = 0

if B <= 5 * A:
  Ans = 1
else:
  Ans = 0

print(Ans)

Submission status: Accepted

Solution code:
x=int(input())
cnt=x//100
t=x%100
check=t//5
t%=5
if t==0:
    if check<=cnt:
        print(1)
    else:
        print(0)
else:
    if check+1<=cnt:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

X = int(input())

ntmp = X//100
nmod = X%100

if 5*ntmp>=nmod:
	ans = '1'
else:
	ans = '0'

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
a=0
for i in range(1000):
 if (i+1)<=N/100 and (i+1)>=N/105:
  a+=1
if a==0:
 print(0)
else:
 print(1)

Submission status: Accepted

Solution code:
from itertools import permutations
x = int(input())
if x < 100:
    print(0)
else:
    digit = x//100
    amari = x %100
    if amari <= digit*5:
        print(1)
    else:
        print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
a = x // 100
b = x % 100
y = 5
c = []
while(b > 0 or y > 0):
    c.append(b // y)
    b = b % y
    y -= 1
print(int(sum(c) <= a))

Submission status: Accepted

Solution code:

import queue as qu

def resolve():
    X=int(input())
    dpt=[False for _ in range(X+1)]
    q= qu.Queue()
    q.put(0)
    while not q.empty():
        nom=q.get()
        if nom>X:
            continue
        if nom==X:
            print(1)
            return 0
        if dpt[nom]==True:
            continue
        dpt[nom]=True
        q.put(nom+100)
        q.put(nom+101)
        q.put(nom+102)
        q.put(nom+103)
        q.put(nom+104)
        q.put(nom+105)
    print(0)                        
if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a = int(input())
    b = a // 100
    c = a % 100

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

Submission status: Accepted

Solution code:
x=int(input())

f=0
for i in range(1,21):
    for j in range(100*i,105*i+1):
        if x ==j:
            f=1
if f==1:
    print(1)
elif x>=2100:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X=int(input())

a=X//100
b=X%100
c=b%10
b=b//10
d=c%5
c=c//5
if d>0:
  e=1
else:
  e=0

temp=2*b+c+e
if temp>a:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
X=int(input())

bai100=X//100
hasuu=X%100

parts=0
plus=5

while hasuu>0:
    
  while hasuu>0:
    parts+=hasuu//plus
    hasuu%=plus
    plus-=1
    
    if plus==0:
      break

print((parts<=bai100)*1)

Submission status: Accepted

Solution code:
x = int(input())
c = [100, 101, 102, 103, 104, 105]
INF = float("inf")
 
dp = [INF]*(x+1)
dp[0] = 0
 
for i in range(len(c)):
    for j in range(x+1):
        if j - c[i] < 0:
            continue
        else:
            dp[j] = min(dp[j], dp[j - c[i]] + 1)
if dp[x] == INF:
    print(0)
else:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

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

Submission status: Accepted

Solution code:
x = int(input())

res = [False for i in range(x + 1)]
res[0] = True
for i in range(100, 106):
    if x < i:
        break
    res[i] = True

for i in range(106, x + 1):
    res[i] = res[i-100] or res[i-101] or res[i-102] or res[i-103] or res[i-104] or res[i-105]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
ok = [False for _ in range(100001)]

ok[100] = True
ok[101] = True
ok[102] = True
ok[103] = True
ok[104] = True
ok[105] = True

for i in range(106, 100001):
    ok[i] = (
        ok[i-100] or ok[i-101]
        or ok[i - 102] or ok[i-103] or ok[i-104] or ok[i-105]
    )

print('1' if ok[x] else '0')

Submission status: Accepted

Solution code:
n = int(input())

num = n//100
mod = n % 100


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

Submission status: Accepted

Solution code:
X = int(input())

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

def check(X):
	prices = [False for x in range(X)]
	prices[0] = True
	for item in items:
		while True:
			changed = False
			
			for i in range(X):
				if prices[i]:
					price = item + i
					if price == X:
						return True
					elif price < X and prices[price] == False:
						prices[price] = True
						changed = True
			
			if not changed:
				break
	return False

if check(X):
	print("1")
else:
	print("0")

Submission status: Accepted

Solution code:
output = 0
X = int(input())
sho = X//100
Y = (X-sho*100)/5
if sho>=Y:
    output = 1
print(output)

Submission status: Accepted

Solution code:
x = int(input())

tmp = x // 100

tmp2 = x - tmp*100

if tmp2 <= tmp * 5:
    print(1)

else:
    print(0)

Submission status: Accepted

Solution code:
	# -*- coding: utf-8 -*-
"""
AtCoder A
"""

import sys, math, random
import numpy as np

# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"

inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    X=I()
    d=100
    u=105
    i=1
    while True:

        if X<d*i:
            print(0)
            exit()
        if X<=u*i and X>=d*i:
            print(1)
            exit()
        else:
            i+=1

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
dp = [0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0]
X=int(input())
rem = X%100
div = int(X/100)
if div>=dp[rem]:
  print('1')
else:
  print('0')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
m = int(input())
f = [0] * (m + 1)
f[0] = 1
for x in range(100, 106):
  for i in range(x, m + 1):
    f[i] = max(f[i - x], f[i])
print(f[m])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
ma=x//100
mi=x//105+int(bool(x%105))
check=False
for m in range(mi,ma+1):
    res = x-100*m
    if res<=5*m:
        check=True
        break
print(int(check))

Submission status: Accepted

Solution code:
X = input()
if int(X) < 100:
    print(0)
    exit()
x = int(X[-2] + X[-1])
X = (int(X)-x)//100
if x > 5*X:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
X = int(input())
count = 0
while X > 0:
    X -= 100
    count += 1
    if 0 <= X <= count*5:
        print(1)
        exit()
print(0)

Submission status: Accepted

Solution code:
goods = [105, 104, 103, 102, 101]


def calc(n: int) -> list:
    n = n % 100
    res = []
    for c in goods:
        c = c % 100
        q = n // c
        n = n % c
        res.append(q)
    return res


def main():
    x = int(input())
    num = calc(x)
    y = 0
    for p, q in zip(goods, num):
        y += p*q
    if y <= x:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys


def main():
    # input = sys.stdin.readline
    money = int(input())

    answer = '0'

    for i in range(1, 1001):
        low = i * 100
        high = i * 105
        if low <= money <= high:
            answer = '1'

    print(answer)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X=int(input())
#print(X)

N=int(X/100)

if 5*N >= X-100*N:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


def main():
    X = int(input())
    if X >= 2000:
        print(1)
        return
    d, m = divmod(X, 100)
    if m <= d*5:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())

a = x%100
b = x//100

count = 0
number = 5
while 1:
    if a == 0:
        break
    count += a//number
    a = a%number
    number -= 1

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

Submission status: Accepted

Solution code:
x = int(input())

kosuu = x // 100
hasuu = x % 100

if hasuu <= kosuu * 5:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
n=int(input())
k=n//100
m=n%100
a=[0,1,2,3,4,5]
i=5
cnt=0
while True:
    if cnt>k:
        print(0)
        exit()
    if m==0:
        print(1)
        exit()
    if m>=a[i]:
        #print(a[i])
        m-=a[i]
        cnt+=1
    else:
        i-=1

Submission status: Accepted

Solution code:
n = int(input())
l = [0] * (n + 110)
m = [100, 101, 102, 103, 104, 105]

for x in range(100, 106):
    l[x] = 1

for x in range(100, n + 1):
    if l[x] == 1:
        for y in m:
            l[x + y] = 1

print(1 if l[n] == 1 else 0)

Submission status: Accepted

Solution code:
x = int(input())

n = x // 100

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
X = int(stdin.readline().rstrip())
a = X // 100
b = X % 100
if X < 100:
    print(0)
else:
  if a*5 >= b:
      print(1)
  else:
      print(0)

Submission status: Accepted

Solution code:
x = int(input())

li = []
for i in range(1000):
    li.append([100*i,105*i])

for i,j in li:
    if i <= x and x <= j:
        print(1)
        exit()

print(0)

Submission status: Accepted

Solution code:
X = int(input())
dp = [1]+[0]*X
if X<100:
    print(0)
    exit()
for i in range(100,X+1):
    if 100 <= i <= 105:
        dp[i] = 1
    elif sum(dp[i-105:i-99]) >= 1:
        dp[i] = 1
if dp[X] == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())

can = set()
can.add(0)

for i in range(1, 2100):
    for k in range(100, 105+1):
        if (i-k) in can:
            can.add(i)
            break
if (X in can) or (X >= 2100) :
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
input = sys.stdin.readline
X = int(input())
if X <2000 :
    count = X//100
    if X%100 > count*5 :
        print(0)
    else:
        print(1)
else:
    print(1)

Submission status: Accepted

Solution code:
x = int(input())
ls = []
for i in range(1,21):
    for j in range(i*5+1):
        ls.append(i * 100 + j)
if x in ls or x >= 2100:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())

for i in range(1,1001):
  
    if 0 <= X-100*i <= 5*i:
        print(1)
        break
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

X = int(input())

c = int(X/100)
a = X%100

c_ = math.ceil(a / 5)

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

Submission status: Accepted

Solution code:
def c():
    x = int(input())
    if x < 100:
        return 0
    # 下2桁
    tmp = int(str(x)[-2:])
    N = x // 100
    lower = 100*N
    upper = 105*N
    if lower <= x <= upper:
        return 1
    else:
        return 0


if __name__ == "__main__":
    ans = c()
    print(ans)

Submission status: Accepted

Solution code:
import math
x = int(input())
res = False
for i in range(math.floor(x / 105), math.floor(x / 100) + 1):
    target = x - 100 * i
    if target < 0:
        continue
    if 0 <= target <= 5 * i:
        res = True
        break
    else:
        continue
if res:
    print("1")
else:
    print("0")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
right=x//100
x-=right*100

def count(n):
    tmp=0
    tmp+=n//5
    n-=tmp*5
    if n!=0:
        tmp+=1
    return tmp

if count(x)<=right:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

Solution code:
x = int(input())

n = x//100
a = x%100

flag = False
while(1):
    if a <= n*5:
        flag = True
        break
    n -= 20
    a += 100
    if n <= 0:
        break

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

Submission status: Accepted

Solution code:
x = int(input())

tmp = x // 100
flag = 0
for i in range(tmp, 0, -1):
    if (x - i*100) <= 5 * i:
        flag = 1
        break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
p, mod = divmod(x,100)
ans = 1
for i in reversed(range(1,6)):
	cnt, mod = divmod(mod, i)
	p -= cnt
	if p < 0:
		ans = 0
		break

print(ans)

Submission status: Accepted

Solution code:
x = int(input())
A = []
for i in range(1,1005):
    A.append([100*i, 105*i])

ans = 0
for i in range(len(A)):
    if A[i][0] <= x <= A[i][1]:
        ans = 1
if ans==1:
    print(1)
else:
    print(0)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

X=int(input())

x=X%100
i=0

for j in range(5,0,-1):
    i+=x//j
    x=x%j
if X//100>=i:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]

    X = II()
    dp = [-1] * (X+106)
    dp[0] = 0
    V = [100,101,102,103,104,105]
    for i in range(X):
            if dp[i] != -1:
                for v in V:
                    dp[i+v] = 1
    if dp[X] == 1:
        print(1)
    else:
        print(0)
    


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    X = int(input())
    num = X // 100
    if X % 100 > 5 * num:
        print(0)
    else:
        print(1)
main()

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
x = int(input())
sum = 0

n = x // 100
m = x - n*100

for i in reversed(range(1, 6)):
    sum += m // i
    m = m % i

if sum <= n:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
x = int(input())
if x < 105:
	if x == 100 or x == 101 or x == 102 or x == 103 or x == 104:
		print(1)
	else:
		print(0)
	exit(0)

dp = [False]*(x+1)
dp[0] = True
dp[100] = True
dp[101] = True
dp[102] = True
dp[103] = True
dp[104] = True
dp[105] = True
for i in range(106,x+1):
	dp[i] =  dp[i-100] or dp[i-101] or dp[i-102] or dp[i-103] or dp[i-104] or dp[i-105]
if dp[x]:
	print(1)
else:
	print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

for i in range(X//105, X//100+1):
    rest = X - 100*i
    if 0 <= rest <= 5*i:
        print(1)
        break
else:
    print(0)

Submission status: Accepted

Solution code:
x = int(input())
dp = [0 for i in range(100003)]
for i in range(100,106):
    dp[i] = 1

for i in range(107,100002):
    for j in range(6):
        if dp[i-(100+j)] == 1:
            dp[i] = 1


print(dp[x])

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys
sys.setrecursionlimit(2000)
dic = defaultdict(list)
X = int(input())
def check(n):
  if n==100 or n==101 or n==102 or n==103 or n==104 or n==105:
    return 1
  elif n<100:
    return 0
  elif dic[n]!=[]:
    return dic[n]
  else:
    for i in range(100,106):
      if check(n-i):
        dic[n-i]=1
        return 1
      else:
        dic[n-i]=0
    return 0
if check(X)==1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#mitsui c
import sys
import math
import collections
#sys.setrecursionlimit(100000)

x=int(input())

#tmp = input().split()
#a,b = list(map(lambda a: int(a), tmp))
#tmp = input().split()
#c,d = list(map(lambda a: int(a), tmp))


if(x>2100):
	print(1)
	sys.exit()

tmpa=x//100
tmpb=x%100
if(tmpb<=tmpa*5):
	print(1)
else:
	print(0)
sys.exit()

Submission status: Accepted

Solution code:
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

x = inn()
pmax = x//100
for p in range(pmax+1):
    r = x - 100*p
    if r <= 5*p:
        print(1)
        exit()
print(0)

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())
N = X // 100
n = X % 100

if N == 0:
  print(0)
elif n / N > 5:
  print(0)
else:
  print(1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
x = int(input())

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
def main():
    n=int(input())
    ary=[0]*100001
    ary[100]=1
    ary[101]=1
    ary[102]=1
    ary[103]=1
    ary[104]=1
    ary[105]=1

    for i in range(200,n+1):
        if ary[i-100]==1:
            ary[i]=1
        if ary[i-101]==1:
            ary[i]=1
        if ary[i-102]==1:
            ary[i]=1
        if ary[i-103]==1:
            ary[i]=1
        if ary[i-104]==1:
            ary[i]=1
        if ary[i-105]==1:
            ary[i]=1
    print(ary[n])
if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

X = int(input())

c = X//100
a = X%100

if (a-1)//5 + 1 <= c:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
def main():
    x = input()
    for i1 in xrange(0, x + 1, 100):
        s1 = i1
        for i2 in xrange(0, x - s1 + 1, 101):
            s2 = s1 + i2
            for i3 in xrange(0, x - s2 + 1, 102):
                s3 = s2 + i3
                for i4 in xrange(0, x - s3 + 1, 103):
                    s4 = s3 + i4
                    for i5 in xrange(0, x - s4 + 1, 104):
                        s5 = s4 + i5
                        if (x - s5) % 105 == 0:
                            print 1
                            return
    print 0

main()

Submission status: Accepted

Solution code:
def main():
    n = int(input())

    extra = n % 100
    need = (extra + 4) // 5
    got = n // 100
    print(int(got >= need))

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())
n1 = X//100
n2 = (X+105-1)//105
#print(n1, n2)
if n1 < n2:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
#総数は十分多い
x = int(input())
cnt = x//100#個数上限

if x-cnt*100>cnt*5:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
x = int(input())

y = x % 100
if y % 5 == 0:
    num = y // 5
else:
    num = y // 5 + 1

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

Submission status: Accepted

Solution code:
n = int(input())

a = n // 100
b = n % 100
c = (b - 1) // 5 + 1

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(X: int):
    N = [0] * (X+1)
    for i in range(100, X+1):
        if 100 <= i <= 105:
            N[i] = 1
        else:
            s = sum(N[i-105:i-99])
            if s:
                N[i] = 1
    print(N[X])
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

a = N//100
b = N%100
if a >= 20 or b <= 5*a:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X=int(input())

A=X//100
B=X%100

if X>=2000:
  print(1)
else:
  if A*5>=B:
    print(1)
  else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

num = x//100
mod = x % 100

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

Submission status: Accepted

Solution code:
X = int(input())

cando = [False for i in range(X+1)]
cando[0] = True
for i in range(X+1):
    if not cando[i]: continue
    for item in [100, 101, 102, 103, 104, 105]:
        if i + item <= X:
            cando[i+item] = True
print(int(cando[X]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import lru_cache
import sys

sys.setrecursionlimit(1000000)

X = int(input())

@lru_cache(None)
def rec(x):
    if x == 0:
        return True
    if x < 0:
        return False
    return any(rec(x-100-d) for d in range(6))

print(1 if rec(X) else 0)

Submission status: Accepted

Solution code:
from math import ceil

x = int(input())
q, r = divmod(x, 100)
nb_need = ceil(r / 5)
if  q >= nb_need:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
N = int(input())
q, mod = divmod(N, 100)
print(1 if mod <= q * 5 else 0)

Submission status: Accepted

Solution code:
N = int(input())

x = N//100

if 105*x >= N:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
if n >= 10000:
  print(1)
  exit()
item_num = n//100
hasu = int(str(n)[-2:])
if item_num*5 >= hasu:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
from sys import stdin


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


def intput():
    return int(input())


def sinput():
    return input().split()


def intsput():
    return map(int, sinput())


# Code

x = intput()

h = x // 100

if x - h * 100 in range(5 * h + 1):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())
import math
A = X/100
B = X/105
print(1) if math.ceil(B) <= math.floor(A) else print(0)

Submission status: Accepted

Solution code:
dp = [0 for i in range(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):
    dp[i] = max(dp[i-100],dp[i-101],dp[i-102],dp[i-103],dp[i-104],dp[i-105])
X = int(input())
print(dp[X])

Submission status: Accepted

Solution code:
x = int(input())
nm = x//100


if nm * 5 >= x-(nm*100):
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

num = X // 100
amari = X % 100

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

Submission status: Accepted

Solution code:
x = int(input())

a = int(x/100)
b = x%100

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