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:
n = int(input())

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

Submission status: Accepted

Solution code:
X=int(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
N = int(input())
m = N//100
M = N//105
if 100*m <= N <= 105*m or 100*M <= N <= 105*M:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
x = int(input())

canbuy = x // 100
amari = x % 100

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

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

Submission status: Accepted

Solution code:
X = int(input())

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

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

Submission status: Accepted

Solution code:
# coding:utf-8
x = int(input())
n = x // 100

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
x = int(input())
print("10"[x % 100 > (x // 100) * 5])

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
if n <= 99:
  print(0)
  exit()
if 100 <= n <= 105:
  print(1)
  exit()
dp = [True] + [False] * n
for i in range(100, n + 1):
  if dp[i - 100] or dp[i - 101] or dp[i - 102] or dp[i - 103] or dp[i - 104] or dp[i - 105]:
    dp[i] = True
print([0, 1][dp[n]])

Submission status: Accepted

Solution code:
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import sys
input = sys.stdin.readline

X = int(input())

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

Submission status: Accepted

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

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

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



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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict
from math import sqrt, factorial
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8')


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



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


"""

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

"""

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
 
if x<100:
	print("0")
	exit()

while 1:
	tm=(str(x)[-2:])
	if int(tm) > 5:
		x-=105
	else:
		print("1")
		exit()
		
	if x<100:
		print("0")
		exit()

Submission status: Accepted

Solution code:
X=int(input())

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

print(1*F)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

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

Submission status: Accepted

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

import heapq

s = {0} 
hq = [0]

prices = list(range(100, 106))

tmp = 0

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

print(int(tmp == x))

Submission status: Accepted

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

#n = int(input())
#l = list(map(int, input().split()))

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())

n=x%100
m=x//100

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

print(lis[X])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict

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

x = readInt()

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

Submission status: Accepted

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

if teen <= 5*number:
    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:
X=input()
Y=int(X)
if Y<=99:
    print(0)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

a = X // 100
b = X % 100

m = 5*a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[22]:


X = int(input())


# In[23]:


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


# In[ ]:

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

    return

resolve()

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import product


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

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

    print(flag)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
#from itertools import combinations # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
X = I()
shop = [100,101,102,103,104,105]
dp = [False] * (X+1) #全部の値段を探索する10**5なので
dp[0] = True
for i in range(X+1):
    for s in shop:
        if i - s >= 0:
            dp[i] = dp[i - s] | dp[i]
print('1' if dp[X] else '0')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x=int(input())

dp=[0]*101000

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

for i in range(100000):
    if dp[i]!=0:
        dp[i+100]+=1
        dp[i+101]+=1
        dp[i+102]+=1
        dp[i+103]+=1
        dp[i+104]+=1
        dp[i+105]+=1

if dp[x]!=0:
    print("1")

else:
    print("0")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X = int(input())

num = X//100
amari = X%100

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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



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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
X = int(input())

r = X%100

x5 = r//5
r5 = r%5

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(dp[X])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = input()

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

X = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

#入力
# s = input()[0:-1]
x = int(input())
# a = list(map(int,input().split()))
# a = [int(input()) for i in range()]


# ab=[]
# for i in range():
#     a,b = map(int, input().split())
#     ab.append([a,b])


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

    

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for a in range(21):
    for b in range(21-a):
        for c in range(21-a-b):
            for d in range(21-a-b-c):
                for e in range(21-a-b-c-d):
                    for f in range(21-a-b-c-d-e):
                        if 100*a +101*b +102*c +103*d +104*e + 105*f == X:
                            print(1)
                            exit()

print(0)

Submission status: Accepted

Solution code:
X=int(input())
if X>=2000:
    print(1)
    exit()
for i in range(20):
    if 100*i>X:
        continue
    for j in range(20):
        if 100*i+101*j>X:
            continue
        for k in range(20):
            if 100*i+101*j+102*k>X:
                continue
            for m in range(20):
                if 100*i+101*j+102*k+103*m>X:
                    continue
                for n in range(20):
                    if 100*i+101*j+102*k+103*m+104*n>X:
                        continue
                    for p in range(20):
                        if 100*i+101*j+102*k+103*m+104*n+105*p==X:
                            print(1)
                            exit()
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

X = INT()

n, m = divmod(X, 100)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

Solution code:
x = int(input())

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

print(0)

Submission status: Accepted

Solution code:
x = int(input())

x_ = divmod(x, 100)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

mod = X % 100
syou = X // 100

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