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())

for i in range(1, 1001):
    for j in range(15001):
        if 100 * i + j == x and j <= 5 * i:
            print("1")
            sys.exit()

print("0")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

Solution code:
m1 = int(input())

div = m1//100
res = m1-div*100

if res<=div*5:
    print(1)
else:
    print(0)

Submission status: Accepted

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

def dp(n):
  if n<100:
    return 0
  if 100<=n and n<=105:
    return 1
  res = 0
  for i in range(100,106):
    res |= DP[n-i]
  return res

for i in range(X+1):
  DP[i] = dp(i)
ans=DP[X]
#print(DP)
print(ans)

#print(*ans, sep='/n')

Submission status: Accepted

Solution code:
cost = int(input())
shou,amari = divmod(cost,100)
if shou*5 >= amari:
  print("1")
else:
  print("0")

Submission status: Accepted

Solution code:
def solve(X):
    for a in range(1 + X // 100):
        for b in range(1 + X // 101):
            for c in range(1+ X // 102):
                for d in range(1 + X // 103):
                    for e in range(1 + X // 104):
                        for f in range( 1 + X // 105):
                            if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 == X:
                                return 1
                            elif a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
                                break
                #        if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
                 #           break
              #      if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
               #         break
            #    if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
             #       break
          #  if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
           #     break
        #if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
         #   break
    return 0

X = int(input())
print(solve(X))

Submission status: Accepted

Solution code:
X = int(input())
# とりあえず 100 で構成しようとして、余剰分を 100 を置換することで構成できないか調べる
q, r = X//100, X%100
if r <= 5 * q:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X=int(input())
A=0
B=X
while B>=100:
    B-=100
    A+=1
while B>=5:
    B-=5
    A-=1
while B>=4:
    B-=4
    A-=1
while B>=3:
    B-=3
    A-=1
while B>=2:
    B-=2
    A-=1
while B>=1:
    B-=1
    A-=1
if A>=0:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X=int(input())

N=X//100
P=X-100*N
if P<=5*N:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
n = int(input())
d, m = divmod(n, 100)
if m <= d*5:
    print(1)
else:
    print(0)

Submission status: Accepted

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

    tmp = x // 100

    x = x - tmp * 100

    if x <= tmp * 5:
        print('1')
    else:
        print('0')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X = int(input())
ans = 0

for i in range(1000):
    if 100*i <= X <= 105*i:
        ans += 1
    else:
        ans += 0

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
# coding: utf-8
import sys
sys.setrecursionlimit(10000000)

#const
# my functions here!
def pin(type=int):
    return map(type,input().rstrip().split())

def resolve():
    N,=pin()
    n,t=N//100,N%100
    if n*5>=t:
        print(1)
        return
    print(0)
"""
#printデバッグ消した？
#前の問題の結果見てないのに次の問題に行くの？
"""
"""
お前カッコ閉じるの忘れてるだろ
"""
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """615"""
        output = """1"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """217"""
        output = """0"""
        self.assertIO(input, output)
if __name__=="__main__":resolve()

Submission status: Accepted

Solution code:
import math
n = int(input())
tmp = math.ceil(n/105)
if n >= tmp * 100 and n <= tmp * 105:
  print(1)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    target = int(input())
    answer = False
    for i in range(1, 1001):
        if i * 100 <= target <= i * 105:
            answer = True
            break
    print(1 if answer else 0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

x = n//100
m = n%100

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

Submission status: Accepted

Solution code:
x = int(input())

if x >= 100 * 100 / (105 - 100):
    print(1)
    exit()

for i in range(20):
    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(100000):
    if(100*i <= x and 105*i >= x):
        print(1)
        exit()
else:
    print(0)

Submission status: Accepted

Solution code:

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd
#import random


def I(): return int(input())


def MI(): return map(int, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['Yes', 'No']
MOD = 10**9+7
inf = float('inf')
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)


show_flg = False
# show_flg = True


def main():
    X = int(input())
    dp = [0] * (X + 1)
    dp[0] = 1

    for i in range(0, X):
        if dp[i] == 1:
            for k in range(100, 106):
                if i + k < len(dp):
                    dp[i+k] = 1

    print(dp[X])


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string
import math
import time
from fractions import gcd
#import random


def I(): return int(input())


def MI(): return map(int, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['Yes', 'No']
MOD = 10**9+7
inf = float('inf')
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)


show_flg = False
# show_flg = True


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

    for i in range(1, 1001):
        if 100 * i <= X and 105 * i >= X:
            print(1)
            return

    print(0)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

x = int(input())

item_number = x // 100
target = x % 100

for i0 in range(item_number + 1):
    for i1 in range(item_number + 1 - i0):
        for i2 in range(item_number + 1 - i0 - i1):
            for i3 in range(item_number + 1 - i0 - i1 - i2):
                for i4 in range(item_number + 1 - i0 - i1 - i2 - i3):
                    for i5 in range(item_number + 1 - i0 - i1 - i2 - i3 - i4):
                        if i1 + (i2 * 2) + (i3 * 3) + (i4 * 4) + (i5 * 5) == target:
                            print(1)
                            exit()
print(0)

Submission status: Accepted

Solution code:
# 品物数を決めると合計金額は100*個数～105*個数の範囲となる
# xが範囲内にあれば買い方が存在する。なければしない。
x = int(input())

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

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
X = list(input())
if len(X)<=2:
    print(0)
    exit()
con = X[len(X)-2:len(X)]
kak = X[0:len(X)-2]
kak = int("".join(kak))
con = int("".join(con))
if con>=5:
    imp1 = con//5
    imp2 = con%5
else:
    imp1 = 1
    imp2 = 0
#print(kak, imp1, imp2)
if kak>=imp1+imp2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
x = int(input())
def judge(x):
    for i in range(1,1000):
        bottom = i*100
        top = i*105
        if bottom <=  x <= top:
            return 1
    return  0

print(judge(x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
L = [i for i in range(100,2001,100)]
#print(L)
LL = []
for i in L:
    n1 = int(str(i)[0])
    n2 = int(str(i)[0]+str(i)[1])
    len1 = len(str(i))
    if len1 == 3:
        LL.append((n1*100+5*n1+1,(n1+1)*100-1))
    else:
        LL.append((n2*100+5*(n2)+1,(n2+1)*100-1))
LL = [(1,99)] + LL
LL.pop()
#print(LL)
for i in range(len(LL)):
    if LL[i][0] <= n <= LL[i][1]:
        print(0)
        exit()
print(1)

Submission status: Accepted

Solution code:
x = int(input())

p = x%100
n = (x-p)//100
b = 0
for i in range(n+1):
    if b==1:
        break
    for j in range(n+1-i):
        if b==1:
            break
        for k in range(n+1-i-j):
            if b==1:
                break
            for l in range(n+1-i-j-k):
                if b==1:
                    break
                for m in range(n+1-i-j-k-l):
                    if i + 2*j + 3*k + 4*l + 5*m == p:
                        print(1)
                        b =1
                        break
if b==0:
    print(0)

Submission status: Accepted

Solution code:
# import bisect
# from collections import Counter, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math

import sys

# import numpy as np

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    for i in range(1, 1000):
        x_min = 100 * i
        x_max = 105 * i

        if x_min <= x <= x_max:
            print(1)
            sys.exit()

    print(0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())

product = list(range(100,105+1))

dp = [0] * 10**6

dp[0] = 1
for i in product:
    dp[i] = 1

for i in range(0,10**5+1):
    for j in product:
        if dp[i] == 1:
            dp[i+j] = 1

print(dp[x])

Submission status: Accepted

Solution code:
X = int(input())

n = X // 100

ansup = 100 * n
ansbottom = 105 * n

if X >= ansup and X <= ansbottom:
	print(1)
else:
	print(0)

Submission status: Accepted

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

for i in range(1000):
    if 100 * i <= x <= 105 * i:
        print("1")
        sys.exit(0)
print("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())
amari = x%100
if amari<=(x//100)*5:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

x = int(input())

if 105 * math.floor(x / 100) >= x:
  ans = '1'
else:
  ans = '0'

print(ans)

Submission status: Accepted

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

for i in range(100, X+1):
    d[i] = any(d[i-j] for j in (100, 101, 102, 103, 104, 105)) 

print(int(d[X]))

Submission status: Accepted

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

for i in range(100, 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]

print(dp[X])

Submission status: Accepted

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

for i in range(X+1):
    for j in [100, 101, 102, 103, 104, 105]:
        if i-j>=0 and dp[i-j]:
            dp[i] = 1

print(dp[X])

Submission status: Accepted

Solution code:
X=int(input())
if(X<100):
    print(0)
    exit()
dp=[0]*100001
dp[100:106]=[1]*6
for i in range(106,X+1):
    for j in range(100,106):
        if(dp[i-j]==1):
            dp[i]=1
            break
print(dp[X])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
dp=[False]*(n+1)
dp[0]=True
l=list(range(100,106))
for i in l:
  for j in range(100,n+1):
    if j>=i and dp[j-i]==True:
      dp[j]=True
print(1*dp[-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
coins = [100, 101, 102, 103, 104, 105]
MAX = 100000

result = [0]*(MAX+1)

# 100の判定
for price in range(1,MAX+1):
    if (price in coins):
        result[price] = 1
    else:
        result[price] = 0

for coin in coins:
    for price in range(106, MAX + 1):
        result[price] += result[price-coin]

X = int(input())
if(result[X] >= 1): print('1')
else : print('0')

Submission status: Accepted

Solution code:
coins = [100, 101, 102, 103, 104, 105]
MAX = 100000
# 100の判定
result = list()
for i in range(MAX + 1):
    if(i % coins[0] == 0) : result.append(1)
    else : result.append(0)

# 101以降
for coin in coins[1:]:
    for j in range(coin, MAX+1):
        result[j] += result[j-coin]

X = int(input())
if(result[X] >= 1): print('1')
else : print('0')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
d = [0] * 200000
d[100] = 1
d[101] = 1
d[102] = 1
d[103] = 1
d[104] = 1
d[105] = 1
for i in range(110, 100000 + 1):
    d[i] += d[i-100]
    d[i] += d[i-101]
    d[i] += d[i-102]
    d[i] += d[i-103]
    d[i] += d[i-104]
    d[i] += d[i-105]
n = int(input())
print("1" if d[n] != 0 else "0")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

maxketa = n//100

if n <= maxketa*100+5*maxketa:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
x = int(input())
y = x//100
ans = 0
for i in range(y,0,-1):
  if x - 100*i <= 5*i:
    ans = 1
    break
print(ans)

Submission status: Accepted

Solution code:
X = int(input())
p = X//100
q = X-p*100
ret = q <= p*5
print(int(ret))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve1(x):
    for c in range(1, x+1):
        if 100*c <= x <= 105*c:
            print(1)
            exit()
    print(0)

def solve2(x):
    dp = [0 for _ in range(100000+1)]
    for i in range(100, 106):
        dp[i] = 1

    for i in range(100, 100000+1):
        for j in range(6):
            if dp[i-(100+j)]:
                dp[i] = 1
    print(dp[x])

x = int(input())
solve2(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

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

Submission status: Accepted

Solution code:
#y=100xとy=105x の間

y=int(input())

for i in range(1000):
  if 100*i<=y<=105*i:
    print(1)
    exit()
print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    X = int(input())
    if 2000 <= X:
        return print(1)
    if X < 100:
        return print(0)
    if X < 1000:
        c = str(X)
        c = int(c[0])*100 + int(c[0])*5
        if X <= c:
            return print(1)
        else:
            return print(0)
    else:
        c = str(X)
        c = int(c[:2])*100 + int(c[:2])*5
        if X <= c:
            return print(1)
        else:
            return print(0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x=int(input())

num=x//100
print(1 if num*5+100*num>=x else 0)

Submission status: Accepted

Solution code:
x=int(input())
if x<100:
  print(0)
  exit()
elif 100<=x<=105:
  print(1)
  exit()
else:
  DP=[False]*(x+1)
  for i in range(x+1):
    coin=list(range(100,106,1))
    if i in coin:
      DP[i]=True
      continue
    DP[i]=True if any(DP[i-m] for m in coin) else False
  print(1 if DP[x]==True else 0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    X = int(input())
    DP = [0 for _ in range(100001)]

    for j in range(100, 106):
        DP[j] = 1

    for i in range(100001):
        for j in range(100, 106):
            idx = i - j
            if idx >= 0 and DP[idx] == 1:
                DP[i] = 1

    print(DP[X])
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())

u = x % 100
r = x // 100
isOk = False
for i in range(r+1):
    if u <= 0:
        isOk = True
        break
    u -= 5
print("01"[isOk])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
X = int(stdin.readline().rstrip())

dp = [0] * (X + 106)
dp[0] = 1

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

Submission status: Accepted

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

X = int(input())

dp = [False] * (X+1)
dp[0]=True

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

for i in range(len(c)):
	for j in range(c[i],X+1):
		if(dp[j-c[i]]):
			dp[j]=True
if(dp[X]):print(1)
else:print(0)

Submission status: Accepted

Solution code:
# C - 100 to 105
def main():
    X = int(input())
    check = lambda x: x * 100 <= X <= x * 105
    is_possible = any(check(i) for i in range(X))
    print(int(is_possible))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def new(t):
    for r in t:
        tmp = []
        cnt = 0
        for b in [100, 101, 102, 103, 104, 105]:
            nex = r - b
            if nex == 0 or r % b == 0:
                return 1
            elif nex < 100:
                cnt += 1
                if cnt == 6:
                    return 0
            tmp.append(nex)
        t = tmp
    # print(t, tmp)
    return new(t)
        

def main():
    x = ni()

    t = [x]
    return new(t)
    

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
n = int(input())
#indexが負の場合、末尾から参照されるので多めにとる
dp = [0]*100200
dp[0] = 1
for i in range(0,100200):
    if dp[i-105]:
        dp[i] = 1
    if dp[i-104]:
        dp[i] = 1
    if dp[i-103]:
        dp[i] = 1
    if dp[i-102]:
        dp[i] = 1
    if dp[i-101]:
        dp[i] = 1
    if dp[i-100]:
        dp[i] = 1
 
print(dp[n])

Submission status: Accepted

Solution code:
n = int(input())
#indexが負の場合、末尾から参照されるので多めにとる
dp = [0]*100200
dp[0] = 1
for i in range(0,100200):
    if dp[i-105]:
        dp[i] = 1
    if dp[i-104]:
        dp[i] = 1
    if dp[i-103]:
        dp[i] = 1
    if dp[i-102]:
        dp[i] = 1
    if dp[i-101]:
        dp[i] = 1
    if dp[i-100]:
        dp[i] = 1

print(dp[n])

Submission status: Accepted

Solution code:
X = int(input())
x = X % 100
A, a = x // 5, x % 5
B, b = a // 4, a % 4
C, c = b // 3, b % 3
D, d = c // 2, c % 2
E = d % 2
if(X - X % 100 >= 100 * (A + B + C + D + E)):
  print(1)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
y=1  # y個購入すると題意をみたす時、1<=y<=x//100、実際に支払い可能な金額は100＊y〜105＊y
if x<100:
  print(0)
else:
  while y<=x//100+1:
    if y*100<=x<=y*105:
      print(1)
      break
    elif y>x//100:
      print(0)
      break
    else:
      y+=1

Submission status: Accepted

Solution code:
X = int(input())

s = X // 100
t = X % 100

if s * 5 >= t:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
X = int(input())
X_ = X % 100
N = int(X / 100)
ans = 0
for i in range(5):
    X_ -= N

if X_ > 0:
    print(0)
else:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ｘ=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def solve(X: int):
    prices = [100, 101, 102, 103, 104, 105]
    flag = [None]*(100000+1)
    flag[0] = True

    def rec(x):
        if flag[x] is not None:
            return flag[x]

        if x < 100:
            flag[x] = False
            return False

        fff = False
        for p in prices:
            fff = fff or rec(x-p)
            if fff == True:
                break
        flag[x] = fff
        return fff

    print(int(rec(X)))
    return


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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
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 pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    x = I()
    t = x // 100
    u = x % 100
    if u <= t * 5:
        return 1

    return 0


print(main())

Submission status: Accepted

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

Submission status: Accepted

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

if mi*5 >= ma:
  print(1)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
x = int(input())

l = [0]*(x+1)
l[0] = 1
for i in range(1,x+1):
    for j in range(100,106):
        if i-j>=0:
            l[i] += l[i-j]

if l[x]>0:
    print(1)
else:
    print(0)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X=int(input())

left=-1
right=1000000
while left<right-1:
   mid=(left+right)//2
   if 105*mid<X:
      left=mid
   else:
      right=mid

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = int(input())
b = a % 100
c = a // 100
for i in range(c):
    for j in range(5, 0, -1):
        if b >= j:
            b -= j
            break
    if b == 0:
        print(1)
        break
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())
import sys
q = X // 100
r = X % 100
if r >= 0 and r <= 5 * q:
    print(1)
    sys.exit()
print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#三井住友信託銀行プログラミングコンテスト2019-C
dp = [0] * 100104
dp[0] = 1
X = int(input())

for i in range(100, 100104):
    for j in range(100, 106):
        if dp[i-j]:
            dp[i] = 1
            
print(dp[X])

Submission status: Accepted

Solution code:
X = int(input())
N = pow(10,5)

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

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

print(dp[X])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
x_ = x%100
n = x//100
if x >= 2300:
    print(1)
else:
    min_n = (x_-1)//5 + 1
    if min_n > n:
        print(0)
    else:
        print(1)

Submission status: Accepted

Solution code:
n=int(input())
q,r=divmod(n,100)
cnt=0
i=5
while cnt<q:
	if r>=i:
		cnt+=1
		r-=i		
	else:
		i=max(i-1,0)
print(1 if r==0 else 0)

Submission status: Accepted

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

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:
N=int(input())
d,m=divmod(N,100)
print(['0','1'][m<=(d*5)])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X = int(input())
dp = [False for _ in range(100001)]
dp[0] = True
for i in range(100,106):
    dp[i] = True
for i in range(107, X + 1):
    if dp[i - 100] == True or dp[i - 101] == True or dp[i - 102] == True\
        or dp[i - 103] == True or dp[i - 104] == True or dp[i - 105] == True:
        dp[i] = True

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

Submission status: Accepted

Solution code:
X = int(input())
flag = False
for i in range(X + 1):
    if 100 * i <= X <= 105 * i:
        flag = True
if flag:
    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


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    x = int(input().rstrip('\n'))
    d, m = divmod(x, 100)
    print(1 if 0 <= m <= d * 5 else 0)


if __name__ == '__main__':
    solve()