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:
import sys
x = int(input())

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

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

print(0)

Submission status: Accepted

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


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

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

    print(0) 


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

X = int(input())
NUM = 1000000

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

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

units = X / 100
mod = X % 100

counter = 0

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

print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

hund=n//100
amari=n%100

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

Submission status: Accepted

Solution code:
total = int(input())
cs = (100, 101, 102, 103, 104, 105)
dp = [int(i % cs[0] == 0) for i in range(total + 1)]
for c in cs[1:]:
  for i in range(c, total + 1): 
    dp[i] += dp[i - c]
if(dp[-1] == 0): print(0)
else: print(1)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def print_ans(X):
    """Test Case
    >>> print_ans(615)
    1
    >>> print_ans(217)
    0
    """
    A, B = divmod(X, 100)
    taples = (1, 2, 3, 4, 5)
    ans = 0
    for i in taples[::-1]:
        C, B = divmod(B, i)
        ans += C
    if ans <= A:
        print("1")
    else:
        print("0")

if __name__ == '__main__':
    X = int(input().rstrip())
    print_ans(X)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X=int(input())

for i in range(0,1001): #最大1000
    if X>=100*i and X<=100*i+5*i:
        print(1)
        exit()

print(0)

Submission status: Accepted

Solution code:
a = int(input())

if a >= 2100:
    print(1)
else:
    b = a//100
    c = a%100
    if c <= b * 5:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
K=int(input())
n=6
a=[100,101,102,103,104,105]
m=[1000000,1000000,1000000,1000000,1000000,1000000]

dp=[-1 for i in range(K+1)]
dp[0]=0
for i in range(n):
    for j in range(K+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(dp)
if dp[K]>=0:
    print(1)
else:
    print(0)
#print(dp)

Submission status: Accepted

Solution code:
x=int(input())
def ans():
  if x<100:
    print(0)
    return
  s=str(x)
  sl=len(s)
  m=int(s[sl-2]) #十の位
  n=int(s[sl-1]) #一の位
  sum=0
  sum+=105*((m*10)/5) #105円を複数買って十の位満たす
  while n>0:
    if n>=5:#105円を買う
      sum+=105
      n-=5
    else:#101,2,3,4円を買う
      sum+=100+n
      n-=n
  if x-sum>=0:#残りで100円を買う
    print(1)
    return
  print(0)
ans()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

num = X // 100
#print((X % 100) // 5)
#print(num)
if num > (X % 100) // 5 or X % 105 == 0:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X=int(input())

temp=-(-X//105)
hiku=temp*105-X

if temp*5>=hiku:
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
X = list(input())
L = len(X)

if len(X) < 3:
    print(0)
    exit()

mon1 = 10*int(X[-2]) + int(X[-1])
mon2 = 0

for i in range(L-2):
    mon2 += int(X[i]) * 10 ** (L-i-1)

a = 0
for i in range(5,0,-1):
    b = mon1 % i
    a += (mon1 - b) / i
    mon1 = mon1 % i

if a > mon2 // 100:
    print(0)
else:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

n = x // 100
m = x % 100

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

Submission status: Accepted

Solution code:

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    x = ii()
    l = [0 for i in range(200005)]

    l[100] = 1
    l[101] = 1
    l[102] = 1
    l[103] = 1
    l[104] = 1
    l[105] = 1
    
    for a in range(6):
        for i in range(150000):
            if l[i] == 1:
                l[i+100+a] = 1
    
    print(l[x])



main()

Submission status: Accepted

Solution code:
n = int(input())
x = str(n)
count = 0

if len(x)<=2:
    print(0)#impossible

#elif n==100 or n==101 or n==102 or n==103 or n==104 or n==105:

else:
    num = int(x[-2]+x[-1])#しも２けた
    pot = (n-num)/100
    while(True):
        if num>5:
            num-=5
            count+=1
        else:
            count+=1
            break
    if count<=pot:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
n = int(input())
if n >= 2000:
    print(1)
else:
    d = n % 100
    l = (d // 5) + (d % 5 != 0)
    #print(d,l)
    if (n // 100) >= l and n != 0:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
x=int(input())
if x<100:
    print(0)
elif x>=2000:
    print(1)
else:
    a=x//100
    #print(a)
    n=x-a*100
    #print(n)
    if n/a>5:
        print(0)
    else:
        print(1)

Submission status: Accepted

Solution code:
def yes():
    print(1)
def no():
    print(0)


X=int(input())
left,right=divmod(X,100)
left_min=0
r=right
for i in range(0,5):
    i=5-i
    count,r=divmod(r,i)
    left_min=left_min+count
if left>=left_min:
    yes()
else:
    no()

Submission status: Accepted

Solution code:
N=int(input())
a=N%100
b=N//100

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

Submission status: Accepted

Solution code:
x = int(input())
for i in range(5, 0, -1):
    x -= (100 + i) * ((x % 100) // i)
    if x < 0:
        print(0)
        exit()
if x % 100:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
x = int(input())
flag = False
for i in range(x//105,x//105+3):
    ans = x - i * 100
    if ans >= 0 and ans <= 5 * i:
        flag = True

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

Submission status: Accepted

Solution code:
def solve(X):
    items = [100, 101, 102, 103, 104, 105]
    dp = [0] * (X+1)

    dp[0] = 1
    for item in items:
        if X < item:
            continue
        dp[item] = 1
    for x in range(100, X+1):
        for item in items:
            if x >= item:
                if dp[x-item]:
                    #print(X,x)
                    dp[x] = dp[x - item]
                    break
    return dp[X]

def check(X):
    print(X, solve(X))

#check(100)
#check(615)
#check(217)
X = int(input())
print(solve(X))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    dp=[0]*100001
    dp[0]=1
    x=int(input())
    for i in range(100,100001):
        if sum(dp[max(i-105,0):i-99])>0:
            dp[i]=1
    print(dp[x])

main()

Submission status: Accepted

Solution code:
x=int(input())
dp=[0]*(x+1)
dp[0]=1
for j in range(6):
    val=100+j
    #dp2=dp[:]
    for i in range(len(dp)):
        if i>=val:
            if dp[i-val]:
                dp[i]=1

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

X = int(input())
num = 0

if X <= 99:
    print(0)
    exit()
else:
    num = X // 100 * 100
    sub = X - num
    if sub <= X // 100 * 5:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
x = int(input())

l = x//100
m = x % 100
r = m//5
if m % 5 != 0: r += 1

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

Submission status: Accepted

Solution code:
X=int(input())
#X=615
DP=[0 for i in range(X+1)]
DP[0]=1
C=[100,101,102,103,104,105]
for i in range(6):
    for j in range(X+1):
        if DP[j]==1 and j+C[i]<=X:
            DP[j+C[i]]=1
print(DP[X])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    x = int(input())
    hund = x//100
    ans = 0
    a = x-hund*100
    als = [0,1,2,3,4]
    if a <= hund*5:
        while hund > 0:
            if a >= 5:
                a -= 5
                hund -= 1
                if a == 0:
                    ans = 1
                    break
            elif a in als:
                ans = 1
                break 
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
arr=[100,101,102,103,104,105]
x=int(input())
dp=[0]*(x+5)
dp[0]=1 
for a in arr :
    for j in range(x+5):
        if a<=j: 
            if dp[j-a]==1:
                dp[j]=1 
print(dp[x])

Submission status: Accepted

Solution code:
x = int(input())
c = x // 100
d = x % 100
mi = (d+4)//5
if c>=mi:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
X = int(input())

k, m = divmod(X, 100)
if k * 5 >= m:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X=int(input())
c=X//100

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

Submission status: Accepted

Solution code:


# m1, d1 = list(map(int, input().split()))
# m2, d2 = list(map(int, input().split()))
X = int(input())

if X < 100:
    print(0)
    exit()

hasu = int(str(X)[-2:])
total = 0
# print(hasu)

div5 = hasu / 5
hasu -= 5*div5
total += 105*div5

div4 = hasu / 4
hasu -= 4*div4
total += 104*div4

div3 = hasu / 3
hasu -= 3*div3
total += 103*div3

div2 = hasu / 2
hasu -= 2*div2
total += 102*div2

div1 = hasu / 1
hasu -= 1*div1
total += 101*div1

# print((div5+div4+div3+div2+div1))
if total > X:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
import sys
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
a = [100,101,102,103,104,105]
dp = [[False]*(N+1) for i in range(6+1)]
dp[0][0] = True

for i in range(1,6+1):
  for j in range(N+1):
    if dp[i - 1][j] == True:
      k = 0
      while 0 <= (j + a[i - 1]*k) < N+1:
        dp[i][j + a[i - 1]*k] = True
        k += 1
print(int(dp[-1][-1]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())
kosu = int(X / 100)
mod = X % 100


if (mod / 5) <= kosu:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
# input = sys.stdin.readline
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    x=ii()
    n=x%100
    cnt=0
    for i in range(1,6)[::-1]:
        m=n%i
        cnt+=n//i
        if m==0: break
        n=m
    print(1 if cnt*100<=x-n else 0)
        



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
X = int(input())

ans = 0

N = int(str(X)[-2:])

for i in range(5, 0, -1):
    while N >= i:
        N -= i
        ans += 1
        
if 100 <= X and X >= ans * 100: print(1)
else: print(0)

Submission status: Accepted

Solution code:
X = int(input())

num_105 = X // 105
for i in range(num_105 + 1):
    remain_money_105 = (X - 105 * i)
    num_104 = remain_money_105 // 104
    for j in range(num_104 + 1):
        remain_money_104 = remain_money_105 - 104 * j
        num_103 = remain_money_104 // 103
        for k in range(num_103 + 1):
            remain_money_103 = remain_money_104 - 103 * k
            num_102 = remain_money_103 // 102
            for l in range(num_102 + 1):
                remain_money_102 = remain_money_103 - 102 * l
                num_101 = remain_money_102 // 101
                for m in range(num_101 + 1):
                    remain_money_101 = remain_money_102 - 101 * m
                    if remain_money_101 % 100 == 0:
                        print(1)
                        exit()
print(0)

Submission status: Accepted

Solution code:
X = int(input())

kosuu = X // 100

amari = X - (kosuu*100)

kosuu5 = amari // 5

amari5 = amari - kosuu5 * 5

if amari5 != 0:
    kosuu5 += 1

if kosuu5 < kosuu + 1:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

num = X // 100
mod_v = X % 100

num_5 = mod_v // 5
mod_5 = mod_v % 5

if (mod_5 == 0 and num >= num_5) or (mod_5 > 0 and num >= (num_5+1)):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]

if 100 <= N <= 105:
    print(1)
    exit(0)
elif 200 <= N <= 210:
    print(1)
    exit(0)
elif 300 <= N <= 315:
    print(1)
    exit(0)
elif 400 <= N <= 420:
    print(1)
    exit(0)
elif 500 <= N <= 525:
    print(1)
    exit(0)
elif 600 <= N <= 630:
    print(1)
    exit(0)
elif 700 <= N <= 735:
    print(1)
    exit(0)
elif 800 <= N <= 840:
    print(1)
    exit(0)
elif 900 <= N <= 945:
    print(1)
    exit(0)
elif 1000 <= N <= 1050:
    print(1)
    exit(0)
elif 1100 <= N <= 1155:
    print(1)
    exit(0)
elif 1200 <= N <= 1260:
    print(1)
    exit(0)
elif 1300 <= N <= 1365:
    print(1)
    exit(0)
elif 1400 <= N <= 1470:
    print(1)
    exit(0)
elif 1500 <= N <= 1575:
    print(1)
    exit(0)
elif 1600 <= N <= 1680:
    print(1)
    exit(0)
elif 1700 <= N <= 1785:
    print(1)
    exit(0)
elif 1800 <= N <= 1890:
    print(1)
    exit(0)
elif 1900 <= N <= 1995:
    print(1)
    exit(0)
elif 2000 <= N:
    print(1)
    exit(0)
else:
    print(0)

Submission status: Accepted

Solution code:
N = int(input())
n = N//100
if n <= 105*(10**6):
  if n*100 <= N and n*105 >= N:
    print(1)
  else:
    print(0)
else:
  print(0)

Submission status: Accepted

Solution code:
x = int(input())

oni = 0
while 1:
	if (1+oni)*100 == x:
		print(1)
		exit(0)
	elif (1+oni)*100 > x:
		break
	else:
		oni += 1
if oni == 0:
	print(0)
	exit(0)
sa = x - oni*100
cnt = 0
for i in range(5):
	j = 5 - i
	while sa >= j:
		sa -= j
		cnt += 1
	if sa == 0:
		break
if cnt <= oni and sa == 0:
	print(1)
else:
	print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

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

hun = x // 100

y = x % 100

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

Submission status: Accepted

Solution code:
X = int(input())

n = X // 100

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())
 
q = X // 100
mod = X % 100

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
sys.setrecursionlimit(10 ** 9)

stdin = sys.stdin
 
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

X = ri()
q, r = divmod(X, 100)
bool = True
if q * 5 < r:
    bool = False
elif X > 105 * 10 ** 6:
    X -= 105 * 10 ** 6
    #パソコン使い果たす
    q, r = divmod(X, 100)
    if q * 4 < r:
        bool = False
    elif X > 104 * 10 ** 6:
        X -= 104 * 10 ** 6
        q, r = divmod(X, 100)
        if q * 3 < r:
            bool = False
        elif X > 103 * 10 ** 6:
            X -= 103 * 10 ** 6
            q, r = divmod(X, 100)
            if q * 2 < r:
                bool = False
            elif X > 102 * 10 ** 6:
                X -= 102 * 10 ** 6
                #クッキー使い果たす
                q, r = divmod(X, 100)
                if q * 1 < r:
                    bool = False
                elif X > 101 * 10 ** 6:
                    X -= 101 * 10 ** 6
                    #サンドイッチ使い果たす
                    q, r = divmod(X, 100)
                    if q * 0 < r:
                        bool = False
                    if X > 100 * 10 ** 6:
                        #おにぎり使い果たす 数が多すぎる
                        bool = False
                        
print(1 if bool else 0)

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

Solution code:
x = int(input())

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

shimo2 = int(str(x)[-2:])
ue = int(str(x)[:-2])

nums = [0]*6

for i in [5,4,3,2,1]:
    nums[i] = shimo2//i
    shimo2 -= nums[i]*i


if ue >= sum(nums):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import math
X = int(input())
q, mod = divmod(X, 100)

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

Submission status: Accepted

Solution code:
x = int(input())
a = []
dif = x // 100
spl = x % 100
cnt = 0
#print(dif, spl)

while spl > 0:
    if spl >= 5:
        spl -= 5
    elif spl == 4:
        spl -= 4
    elif spl == 3:
        spl -= 3
    elif spl == 2:
        spl -= 2
    elif spl == 1:
        spl -= 1
    cnt += 1

#print(cnt)

if dif >= cnt:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

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

    if X < 100:
        print(0)
        exit()
    modx = X % 100
    warix = X // 100



    for i in range(warix + 1):
        if i > warix:
            break
        for j in range(warix + 1):
            if i + j > warix:
                break
            for k in range(warix + 1):
                if i + j + k > warix:
                    break
                for l in range(warix + 1):
                    if i + j + k + l > warix:
                        break
                    for m in range(warix + 1):
                        if i + j + k + l + m > warix:
                            break
                        for n in range(warix + 1):
                            if i + j + k + l + m + n > warix:
                                break
                            if i + 2 * j + 3 * k + 4 * l + m * 5 > 99:
                                break
                            if (i + 2 * j + 3 * k + 4 * l + m * 5) == modx and warix == (i + j + k + l + m + n):
                                print(1)
                                exit()

    print(0)



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

a = X % 100
b = X // 100

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

Submission status: Accepted

Solution code:
import sys

x = int(input())

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

    sys.exit(0)

print(1)

Submission status: Accepted

Solution code:
X = int(input())
N, M = divmod(X, 100)

if N * 5 >= M:
    answer = 1
else:
    answer = 0

print(answer)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000)

memo = {}

def judge(x):
	if x < 0:
		return False
	elif x == 0:
		return True
	else:
		if x not in memo:
			memo[x] = judge(x - 100) or judge(x - 101) or judge(x - 102) or judge(x - 103) or judge(x - 104) or judge(x - 105)
		return memo[x]


if __name__ == "__main__":
	X = int(input())
	if judge(X):
		print(1)
	else:
		print(0)

Submission status: Accepted

Solution code:
x = input()
s = list(x)
x = int(x)

if len(s) < 3:
    print(0)
else:
    xx = int(s[-2]+s[-1])
    num_item = xx//5
    if xx%5 != 0:
        num_item += 1
    
    hun = int(''.join(s[0:-2]))
    if hun < num_item:
        print(0)
    else:
        print(1)

Submission status: Accepted

Solution code:
X = int(input())

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

Submission status: Accepted

Solution code:
def solve():
    X = input()

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

    twoDig = int(X[len(X)-2:])
    rest = int(X[:len(X)-2])

    ans = '1'
    for i in range(rest+1):
        if twoDig == 0:
            break
        for n in range(5, 0, -1):
            if twoDig - n >= 0:
                twoDig -= n
                break
    else:
        ans = '0'
    
    print(ans)

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
x=int(input())

a=x%100
b=x-a

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

Submission status: Accepted

Solution code:
import sys
# input = sys.stdin.buffer.readline
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getlist():
    return list(map(int, input().split()))
import heapq
import bisect
import copy
# import math
def warshall_floyd(d, N):
    for k in range(N):
        for i in range(N):
            for j in range(N):
                d[i * N +j] = min(d[i * N +j], d[i * N + k] + d[k * N + j])
    return d

MOD = 10**9 + 7

def main():
    n = getN()
    kosuu = n // 100
    if n % 100 <= kosuu * 5:
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
words = lambda t : list(map(t, input().split()))
n = int(input())
ans = False
if n >= 2000:
    ans = True
else:
    if (n // 100) * 5 >= (n % 100):
        ans = True
if ans:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
ng = []
i = 0

while i < 2000:
    tmp = [num for num in range(int(i*1.05)+1, i+100)]
    ng.extend(tmp)
    i += 100

if x in ng:
    print('0')
else:
    print('1')

Submission status: Accepted

Solution code:
x=int(input())

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

aa=x // 100
a=x- 100*aa
b=a//5
c=a%5

def g(r):
  if r==0:
    return 0
  else:
    return 1
if b+g(c)<=aa:
  print('1')
else:
  print('0')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	X = inputInt()

	tmp = X % 100
	kai = X // 100

	tmptmp = -(-tmp // 5)

	if tmptmp <= kai:
		print(1)
	else:
		print(0)

	#print(tmptmp)
	#print(kai)



if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
x = int(input())
a = x // 100
b = x % 100

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

Submission status: Accepted

Solution code:
x = int(input())
q = x // 105
r = x % 105

if r == 0 or r >= 100 - 5 * q:
    print(1)
else:
    print(0)

Submission status: Accepted

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

20

y = x % 100


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def main():
    N = int(input())
    C = N // 100
    H = N % 100

    for i in [5,4,3,2,1]:
        Ci = H // i
        if Ci > C:
            print(0)
            return
        C -= Ci
        H -= Ci * i
        N -= (100 + i) * Ci
        if N < 0:
            print(0)
            return

    print(1)



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x = int(input())

max_a = (x // 100) + 1
max_b = (x // 101) + 1
max_c = (x // 102) + 1
max_d = (x // 103) + 1
max_e = (x // 104) + 1

for a in range(max_a):
  for b in range(max_b):
    for c in range(max_c):
      for d in range(max_d):
        for e in range(max_e):
          for_f = x - (a * 100 + b * 101 + c * 102 + d * 103 + e * 104)
          if for_f >= 0 and for_f % 105 == 0:
            # print(a, b, c, d, e, for_f // 105)
            print('1')
            exit(0)
print('0')

Submission status: Accepted

Solution code:
x=int(input())
num=x//100
make=x-(num*100)
if num*5>=make:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
x = int(input())

n = x // 100
rest = x % 100

if n >= (rest + 4) // 5:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
X = int(input())

x1 = X // 100
x2 = X % 100

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

Submission status: Accepted

Solution code:
# A,B = map(int, input().split())
# C,D = map(int, input().split())
N = int(input())
S = str(N)

if len(S)>=3:
    shimo2 = int(S[-2:])
    hoka = int(S[:-2])

    count = 0
    while shimo2>0:
        if shimo2 >= 5:
            shimo2 -= 5
            count += 1
        elif shimo2 >= 4:
            shimo2 -= 4
            count += 1
        elif shimo2 >= 3:
            shimo2 -= 3
            count += 1
        elif shimo2 >= 2:
            shimo2 -= 2
            count += 1
        elif shimo2 >= 1:
            shimo2 -= 1
            count += 1
            
    if hoka >= count:
        ans = 1
    else:
        ans = 0
else:
    ans = 0

print(ans)

Submission status: Accepted

Solution code:
def main():
    X = int(input())
    for a in range(X // 100 + 1):
        for b in range((X - a * 100) // 101 + 1):
            for c in range((X - a * 100 - b * 101) // 102 + 1):
                for d in range((X - a * 100 - b * 101 - c * 102) // 103 + 1):
                    for e in range((X - a * 100 - b * 101 - c * 102 - d * 103) // 104 + 1):
                        for f in range((X - a * 100 - b * 101 - c * 102 - d * 103 - e * 104) // 105 + 1):
                            if X - a * 100 - b * 101 - c * 102 - d * 103 - e * 104 - f * 105 == 0:
                                print(1)
                                exit()

    print(0)




if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())

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

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