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:
y = int(input())
dp = [0]*99
dp.insert(0,1)
if y >= 2000:
    print(1)
else:
    for x in range(100,y+1):
        if dp[x-100] == 1 or dp[x-101] == 1 or dp[x-102] == 1 or dp[x-103] == 1 or dp[x-104] == 1 or dp[x-105] == 1:
            dp.append(1)
        else:
            dp.append(0)

    print(dp[y])

Submission status: Accepted

Solution code:
x = int(input())
if x >= 2000:
    print(1)
else:
    c = x//100 + 1
    am = x%100
    for i in range(c):
        for j in range(c-i):
            for k in range(c-i-j):
                for l in range(c-i-j-k):
                    for m in range(c-i-j-l):
                        if am == i*5 + j*4 + k*3 + l*2 + m*1:
                            print(1)
                            exit()
    print(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())
menu = [100,101,102,103,104,105]

ans = 0
x = X//100

X_bit2 = int(str(X)[-2:])
if X_bit2 <= x*5:
  ans = 1

print(ans)

Submission status: Accepted

Solution code:
# C - 100 to 105
# https://atcoder.jp/contests/sumitrust2019/tasks/sumitb2019_c

x = int(input())
d, m = divmod(x, 100)

D = [0] * 5

for i in range(4, -1, -1):
  D[i], m = divmod(m, i + 1)

if d >= sum(D):
  print(1)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())
x = X%100
cnt = 0
cnt += x//5
x = x%5
cnt += x//4
x = x%4
cnt += x//3
x = x%3
cnt += x//2
x = x%2
cnt += x
X = X-X%100
if X>=100*cnt:
    print(1)
else:
    print(0)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X = int(input())

for i in range(1, 100001):
    if 100*i <= X <= 105*i:
        print(1)
        exit(0)
print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

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>=0:
            dp[i] |= dp[i-j]

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

Submission status: Accepted

Solution code:
x = int(input())
a = x//100
b = x%100
l = list(range(1,6))[::-1]
i = 0
cnt = 0
while b > 0:
  if l[i] > b: i += 1
  cnt += b//l[i]
  b = b % l[i]
print(1 if cnt <= a else 0)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    x=int(input())
    a,b=divmod(x,100)
    if x<100:
        print(0)
    elif b<=a*5:
        print(1)
    else:
        print(0)
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())
Food = [100,101,102,103,104,105]
dp = [False] * (X+1)
dp[0] = True
for i in range(X+1):
    for f in Food:
        if i - f >= 0:
            #print(i,i-f)
            dp[i] = dp[i - f] | dp[i]
print('1' if dp[X] else '0')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = str(input())
if len(n) <= 2:
    print(0)
else:
    a = n[0:-2]
    tens = int(n[-2])
    need = tens*2
    ones = int(n[-1])
    if ones == 0:
        need +=0
    elif ones <= 5:
        need += 1
    else:
        need +=2
    if need <= int(a):
        print(1)
    else:
        print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import collections
import itertools as it
import math
#import numpy as np
 
#  = input()
x  = int(input())
#  = map(int, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

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

Submission status: Accepted

Solution code:
import itertools
x = int(input())
k = x%100
n = x//100
ans = 0
if n*5>=k and n!=0:
    ans = 1
print(ans)

Submission status: Accepted

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

X = int(input())
N = 100000
k = 1
for i in range(N):
    if k*100 <= X <= k*105:
        print(1)
        exit()
    k += 1
print(0)

Submission status: Accepted

Solution code:
X = int(input())

more_100 = X/100
under_100 = X%100
X2 = int(under_100 / 5)
X3 = under_100 % 5
if X3 != 0 and X2 + 1 <= more_100:
  print(1)
elif X3 == 0 and X2 <= more_100:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
def solve(target):
    n = int(target / 100)
    if n * 100 <= target <= n * 105:
        print(1)
    else:
        print(0)

solve(int(input()))

Submission status: Accepted

Solution code:
def one_int():
    return int(input())

N=one_int()
num=int(N/100) 
amari = N % 100
if num*5 < amari:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
X = int(input())
DP = [0]*100001
DP[100] = 1
DP[101] = 1
DP[102] = 1
DP[103] = 1
DP[104] = 1
DP[105] = 1

for i in range(106, 100001):
    if any([DP[i-100], DP[i-101], DP[i-102], DP[i-103], DP[i-104], DP[i-105]]):
        DP[i] = 1
print(DP[X])

Submission status: Accepted

Solution code:
X = int(input())
flag = 1
if X < 100:
  flag = 0
else:
  a = X%100
  b = a%10
  c = (a-b)/10
  count = 2*c
  if 1 <= b <= 5:
    count += 1
  elif 6<= b <= 9:
    count += 2
  if X//100 < count:
    flag = 0
print(flag)

Submission status: Accepted

Solution code:
X = int(input())

x = X % 100
tmp = (x // 5) * 105
if x % 5 != 0:
    tmp += 100 + (x % 5)
if tmp > X:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
X = int(input())
C = 1000000

output = []
for c in range(C):
    if (c*100) <= X <= (c*105):
        output.append(1)
    else:
        output.append(0)
if max(output):
  print("1")
else:
  print("0")

Submission status: Accepted

Solution code:
x = int(input())

c = x//100

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

Submission status: Accepted

Solution code:
X = int(input())
N = X//100
X %=100
if N == 0:
    print(0)
    exit()
if X == 0:
    print(1)
    exit()
for i in [5,4,3,2,1]:
    for j in range(N,0,-1):
        if X//(i*j) > 0:
            N -= j
            X %= i*j
            break
    if N == 0:
        break
if X == 0:
    print(1)
else:
    print(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())
X=x%100
Y=x//100
if X>5*Y:
  print('0')
else:
  print('1')

Submission status: Accepted

Solution code:
import itertools
x = int(input())
count = 0
coins = [ 100, 101 , 102 , 103 , 104 , 105]
for i in itertools.combinations_with_replacement(coins, x // 100):
  if sum(i) == x:
    count = 1
    break
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X=int(input())

for i in range(1,1001):
  if i*100 <= X <= i*105:
    print(1)
    exit()
print(0)

Submission status: Accepted

Solution code:
X = int(input())

if X >= 2000:
    print(1)
elif X < 100:
    print(0)
else:
    limit, mods = divmod(X, 100)
    if mods / limit <= 5:
        print(1)
    else:
        print(0)

Submission status: Accepted

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

import fractions
import copy
import bisect
import math
import numpy as np
import itertools
from itertools import combinations_with_replacement
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入力が早いが使える時に使っていこう
from operator import mul
from functools import reduce
from collections import Counter
#from collections import deque

#input = stdin.readline


j=0
k=0
n=3
r=1
a=[0]
#n=int(input())
#r=int(input())
#print(M)
#A=int(input())
#B=int(input())
#print(N)
"1行1つの整数を入力を取得し、整数と取得する"


#number_list=list(map(int, input().split(" ")))#数字の時
#print(number_list)
"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#メモ
for i in number_list:#こっちの方がrage使うより早いらしい
    print(number_list[i-1])#

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''
#array=[input().split()for i in range(N)]
#print(type(array[0][0]))
#print(array)
"正方行列にstr型の値を入力"
'''

#brray=[list(map(int, input().split(" ")))for i in range(N)]
#print(type(brray[0][0]))
#print(brray)
'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"
#以下に別解を記載
#N, M = [int(i) for i in input().split()]
'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''




#s=input()
#a=[int(i) for i in s]
#print(a[0])
#print([a])
#単数値．桁ごとに分割したい．入力と出力は以下の通り
#イメージとして1桁ごとにリストに値を入れているかんじ
#intを取ると文字列分解に使える
'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()#str style 何個でもいけることが多い
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''


#a= stdin.readline().rstrip()
#print(a.upper())
"aという変数に入っているものを大文字にして出力"


#a,b=map(int, input().split())  #int style 複数数値入力　「A B」みたいなスペース空いた入力のとき

#なんかうまく入力されるけど
#a=[[int(i) for i in 1.strip()]for 1 in sys.stdin]
#a = [[int(c) for c in l.strip()] for l in sys.stdin]]
#print(a)
#複数行の数値を入力して正方行列を作成


##############################################################################################
##############################################################################################
#under this line explains example calculation



'''
コンビネーションの組み合わせの中身を出力する形式
for i in itertools.combinations(brray, 2)
combinationsをpermutationsにすれば順列になる
今回なら(abc133B)
入力
1 2
5 5
-2 8
出力
[[1, 2], [5, 5], [-2, 8]]
もちろん一次元リストでも使えるし
何よりiもリストのように使えるので便利
'''

#nCr combination
'''
def cmb(n,r):
    #When n < r , this function isn't valid
    r= min(n-r,r)
    #print(n,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n-r, -1))
    #flochart mul(n,n-1)=x
    #next     mul(x,n-2)........(n-r+1,n-r)
    #mul read a,b and returns a*b

    under = reduce(mul, range(1, r+1))
    #print(over, under)
    #reduce is applied mul(1,2)=2
    #next   mul(2,3)=6
    #next   mul(6,4)=4.........last(r!,r+1)=r+1!

    return over // under
    #// is integer divide
    #calc example 5C2
    #over=5*4*3
    #under=3*2*1
a = cmb(n, r)
#print(a)
'''

'''
import itertools
from itertools import combinations_with_replacement

combinationについて
以下の違いを意識しよう
combinations() p, r 長さrのタプル列、ソートされた順で重複なし

combinations_with_replacement() p, r 長さrのタプル列、ソートされた順で重複あり


使用例 　　　　　　　　　　　                  出力　　
combinations('ABCD', 2)　　　　　　　　　　　　AB AC AD BC BD CD

combinations_with_replacement('ABCD', 2)　　 AA AB AC AD BB BC BD CC CD DD
'''



'''
#集計
#example
#a=[2,2,2,3,4,3,1,2,1,3,1,2,1,2,2,1,2,1]
#a=Counter(a)
for i in a.most_common(n):print(i)
#most_common()メソッドは、出現回数が多い要素順にCounterオブジェクトを並び替えます。
#引数にint型の数字nを設定した場合は、出現回数が高い上位ｎ個の要素を返します。
#何も設定しなければ、コンテナ型にあるすべての要素を出現回数の順番に並び替えたタプル型オブジェクトを返します。
#out put
#(2, 8)
 #(1, 6)
#(3, 3)
#(4, 1)
'''


#二部探索(binary search)
#A = [1, 2, 3, 3, 3, 4, 4, 6, 6, 6, 6]
#print(A)
#index = bisect.bisect_left(A, 5) # 7 最も左(前)の挿入箇所が返ってきている
#A.insert(index, 5)
#print(index)
#print(A)
'''
bisect.bisect_left(a, x, lo=0, h=len(a))
引数
a: ソート済みリスト
x: 挿入したい値
lo: 探索範囲の下限
hi: 探索範囲の上限
(lo, hiはスライスと同様の指定方法)
bisect_leftはソートされたリストaに対して順序を保ったままxを挿入できる箇所を探索します。leftが示す通り、aにすでにxが存在している場合は、挿入箇所は既存のxよりも左側になります。また、lo, hiを指定することで探索範囲を絞り込むことも可能です。デフォルトはaの全体が探索対象です。
'''

'''
素数の判定
'''


def is_prime(n):
    if n == 1: return False

    for k in range(2, int(np.sqrt(n)) + 1):
        #sqrt(n)+1以上は考えて約数はないので却下
        if n % k == 0:
            return False
            #割り切れたらFalse
    return True


'''
npのmaxとmaximumの違い
xs = np.array([1, -2, 3])
np.max(xs, 0)
この出力は3となります．[1, -2, 3]と0の4つの数字のうち，最も大きい値を出力します．

一方で，[max(1, 0), max(-2, 0), max(3, 0)]を出力したい時があります．
その時は，numpyのmaximum関数を用います．

xs = np.array([1, -2, 3])
np.maximum(xs, 0)  # [1, 0, 3]

'''

def factorial(x, mod=10**9+7):
    # x!
    # 階乗
    # ex) factorial(5) = 120
    tmp = 1
    for i in range(1, x+1):
        tmp = (tmp * i) % mod
    return tmp
    '''
    Basically, when you do a**d % n, you actually have to calculate a**d, which could be quite large.
    But there are ways of computing a**d % n without having to compute a**d itself, and that is what pow does.
    '''


########################################################################
########################################################################
#b2=a[:]  #1次元のときはコピーはこれで良い
#print(b2)

#a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
#b3=copy.deepcopy(a)  #2次元配列はこうコピーする
#print(b3)

def main():

    steps=0
    state=0
    w=1
    j=0
    k=0
    x=int(input())
    #a,b=map(int, input().split(" "))
    q=x//100
    mod=x%100
    if 5*q >= mod:
        print(1)
        sys.exit()
    print(0)
    #nl=list(map(int, input().split(" ")))#数字の時
    #s=input()
    #a=[int(i) for i in s]#int取るとstrでも行ける
    #print(a)




    #if state in known_states and not flag: # state => 2 steps => 5
        #こうやってある要素がリストの中にあるか探すのか
    #print(f'steps: {steps}, state: {state}')
    #こう書いてあるとデバックしやすい

    #dp= [[0]*3 for i in range(5)]#列　行
    #dp用の0の入ったやつ
    #dp= [[0]*(w+1) for i in range(n+1)]#0からwまでのw+1回計算するから
    #print(dp)＃初期条件が入る分計算回数+1列分必要(この場合は判断すべきものの数)
    DP = np.zeros(w+1, dtype=int)#これでも一次元リストが作れる
    exdp=np.zeros((3,4)) # ３×４の２次元配列を生成。2次元ならこう
    #dtypeは指定しないとfloatになる
    #for i in range(n):#ちょっとした入力に便利
    #    a, b = map(int, input().split())
        #dp[i][0] += [a]
        #これだとintとlistをつなぐことになって不適
    #    dp[i] += [a]
    #    dp[i] += [b]
        #これはうまくいく
        #やり方はいろいろあるということ
    #print(dp)


    "1行1つの整数を入力を取得し、整数と取得する"
    #nl=list(map(int, input().split(" ")))#数字の時
    #print(number_list)
    "12 21 332 とか入力する時に使う"
    "1行に複数の整数の入力を取得し、整数として扱う"
    #brray=[list(map(int, input().split(" ")))for i in range(N)
    #print(brray)



    '''
    入力
    1234
    出力
    [1, 2, 3, 4]
    '''
    pin_l=["x" for i in range(10)]#内包表記に慣れろ
    #print(pin_l)

    ls = ["a", "b", "c", "d", "e"]


    #print(ls[2:5])
    #スライスでの取得

    #print(ls[:-3])
    #一番左端から右から3番目より左まで取得

    #print(ls[:4:2])
    #スライスで1個飛ばしで取得
    #ないときは左端スタート
    #始点のインデックス番号 : 終点のインデックス番号 : スキップする数+1
    #print(ls[::2])
    '''
    lsというリストの場合に、1つ飛びの値を取得したい場合には
    ls[::2]
    のようにします。こうすると、
    ["a", "c", "d"]と出力される
    '''

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x = input()
x = '000'+x
z = x[:-2]
y = x[-2:]
s = 0
z = int(z)
y = int(y)
L = []
y1 =y//5
if z>=20 or z>=(y1+(y%5!=0)):
    print(1)
    exit()
print(0)

Submission status: Accepted

Solution code:
x = input()
x = '000'+x
z = x[:-2]
y = x[-2:]
s = 0
z = int(z)
y = int(y)
L = []
for i in range(1,21):
    s +=5
    if s>=y and z>=i:
        print(1)
        exit()
if z>=20:
    print(1)
    exit()
print(0)

Submission status: Accepted

Solution code:
x = int(input())
y = x % 100
z = (y // 5) + ((y % 5) // 4) + ((y % 5 % 4) // 3) + ((y % 5 % 4 % 3) // 2) + (y % 5 % 4 % 3 % 2)
if x // 100 >= z:
    print(1)
else:
    print(0)

Submission status: Accepted

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

mod = x%100
quo = x//100

#print(mod,quo)

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

Submission status: Accepted

Solution code:
X = int(input())

for i in range(X//100 + 1):
    if 100*i <= X <= 105*i:
        print("1")
        exit()

print("0")

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/sumitrust2019/tasks/sumitb2019_c

x = int(input())

n = x // 100
m = x % 100
c = 0
for i in range(1, 6)[::-1]:
    c += m // i
    m %= i
if c <= n:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
A=int(input())
can_max=105
can_min=100
while A > can_max:
    can_max+=105
    can_min+=100
    if can_min<=A<=can_max:
        print(1)
        exit()
if can_min<=A<=can_max:
    print(1)
    exit()
print(0)

Submission status: Accepted

Solution code:
def solve(X:int) -> int:
    if(X < 100):return 0
    first = int(str(X)[-1])
    seccond = int(str(X)[-2])
    ans = 0
    if(first >= 6):
        ans += first + 200
    elif(first > 0):
        ans += first + 100
    ans += (seccond * 2) * 105
    return 1 if(ans <= X) else 0


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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

n = x //100
h = x % 100

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x = int(input())
tmp = []
for j in range(1,20):
    a = [i for i in range(100*j,105*j)]
    tmp=tmp+a

for k in range(1,20):
    b = 105*k
    tmp.append(b)

if x >= 2000:
    print(1)
else:
    if x in tmp:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
'''
参考
https://penyoo.hatenablog.com/entry/2019/12/02/045335
X を 「X//100=a…購入商品数」と「X%100=b…端数」の2つに分けて考える
※商品の価格が「100～105（100+0～100+5）」になっているため
a、bについて
    b//5!=0の場合
        b//5+1<=a
    b//5==0の場合
        b//5<=a
が成立すれば、買い物ができる

例1：X=617円の場合⇒買い物可能
a=X//100==6     b=X%100==17     b//5+1==4<=a
例2：X=489円の場合⇒買い物不可
a=X//100==4     b=X%100==89     b//5+1==18>a
'''
X = int(input())
purchase_count = X // 100
surplus = X % 100
tmp = surplus // 5

if surplus % 5 != 0:
    tmp += 1

if purchase_count >= tmp:
    print(1)
else:
    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)
    break
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    X=int(input())
    flag=0
    for i in range(1,1001):
        if 100*i<=X<=105*i:
            flag=1
    print(flag)

main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    x=int(input())
    mai,y=divmod(x,100)
    if 5*mai>=y and x>=100:
        ans=1
    else:
        ans=0
    print(ans)
resolve()

Submission status: Accepted

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

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

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

def main():
    X = int(input())
    dp = [False] * (X+1)
    # dp[i+1] := i円、そのお金で払えますか?
    # dp[i - 100], ... がTrue なら Trueだあ
    MENU = [100,101,102,103,104,105]
    dp[0] = True # 0円は買える
    for i in range(X):
        for v in MENU:
            if i + 1 - v < 0:
                continue
            dp[i+1] |= dp[i+1-v]
    print(1 if dp[X] else 0)
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000)
X = int(input())
items = (100, 101, 102, 103, 104, 105)
seen = set()
def dfs(n):
    if(n>100000):
        return 0
    if(n not in seen):
        seen.add(n)
        for i in items:
            dfs(n+i)

dfs(0)
if(X in seen):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
x = int(input())
lst = []
for a in range(2):
    for b in range(2):
        for c in range(2):
            for d in range(2):
                for e in range(2):
                    for f in range(2):
                        lst.append(100*a + 101*b + 102*c + 103*d + 104*e + 105*f)
ans = 0
for n in lst[1:]:
    tmp = x % n
    if tmp in lst:
        ans = 1
        break

print(ans)

Submission status: Accepted

Solution code:
X = int(input())

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

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

Submission status: Accepted

Solution code:
x = int(input())

if x>= 105*20:
  print(1)
  exit()
  
  
dp = [0 for i in range(x+1)]
dp[0]= 1

for i in range(x):
  if dp[i]== 1:
    for  j in range(100,105+1):
      if i+j<= x:
        dp[i+j] = 1
print(dp[x])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

r, q = x // 100, x % 100

# 品物の個数は少なくとも r 個

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
a=x%100
cnt = (a+4)//5

if x//100 >= cnt:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
## dp ##
def DD2(d1,d2,init=0): return [[init]*d2 for _ in range(d1)]
def DD3(d1,d2,d3,init=0): return [DD2(d2,d3,init) for _ in range(d1)]
## math ##
def to_bin(x: int) -> str: return format(x, 'b') # rev => int(res, 2)
def to_oct(x: int) -> str: return format(x, 'o') # rev => int(res, 8)
def to_hex(x: int) -> str: return format(x, 'x') # rev => int(res, 16)
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i):
            is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]
## libs ##
from itertools import accumulate as acc
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left

#======================================================#

def main():
    x = II()
    n = x//100
    m = set([i for i in range(100*n, (105*n)+1)])
    if x in m:
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X = int(input())

num = X // 100

cent = X - 100 * num

for i in range(num):
  cent -= 5
  
if cent <= 0:
  print(1)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

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

x=int(input())
n=x//100
sub=x%100

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
y = int(x)
if y < 100:
    print(0)
else:
    ans = 0
    i = int(x[:len(x)-2])
    if 100*i <= y and y <= 105*i:
        ans = 1
    print(ans)

Submission status: Accepted

Solution code:
x = input()
y = int(x)
if y < 100:
    print(0)
else:
    ans = 0
    c = int(x[:len(x)-2])
    for i in range(1,c+1):
        if 100*i <= y and y <= 105*i:
            ans = 1
            break
    print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

x = int(input())
for i in range(x):
    if i * 100 <= x <= i * 105:
        print(1)
        sys.exit()

print(0)

Submission status: Accepted

Solution code:
X = int(input())
def hoge(X):
    if ((X%100)%5) > 0:
        if 1+ ((X%100)//5) <= X//100:
            return 1
        else:
            return 0
    else:
        if ((X%100)//5) <= X//100:
            return 1
        else:
            return 0
print(hoge(X))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())
a = [100, 101, 102, 103, 104, 105]
dp = [[False]*100010 for _ in range(10)]
dp[0][0] = True

for i in range(6):
    for j in range(X+1):
        dp[i+1][j] |= dp[i][j]
        if j >= a[i]:
            dp[i+1][j] |= dp[i][j-a[i]]
            dp[i+1][j] |= dp[i+1][j-a[i]]
if dp[6][X]:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())
a = [100, 101, 102, 103, 104, 105]
dp = [[False]*100010 for _ in range(10)]
dp[0][0] = True

for j in range(X+1):
    for i in range(6):
        dp[i+1][j] |= dp[i][j]
        if j >= a[i]:
            dp[i+1][j] |= dp[i][j-a[i]]
            dp[i+1][j] |= dp[i+1][j-a[i]]
if dp[6][X]:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys
X = int(input())
if 1 <= X and X < 100:
    print("0")
    sys.exit()
i = 0
dp = [0]*(X+1)
dp[0] = 1
for i in range(100, X+1):
    for j in range(6):
        if dp[i-(100+j)] == 0:
            pass
        else:
            dp[i] = 1
print(dp[X])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sum = input()

if len(sum) < 3:
    print('0')
else:
    last_2_digit = sum[-2:]
    upper_digit = sum[:-2]

    if last_2_digit == '00':
        print('1')
    else:
        required_num = (int(last_2_digit) - 1) // 5 + 1
        # print(upper_digit, last_2_digit, required_num)
        if int(upper_digit) >= required_num:
            print('1')
        else:
            print('0')

Submission status: Accepted

Solution code:
x = int(input())

x_ = x%100

t = 0
a = 5
while x_ != 0:
    t += x_//a
    x_ -= (x_//a)*a
    a -= 1


if x//100 >= t:
    print(1)
else:
    print(0)

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

def readInts():
  return list(map(int,input().split()))
def main():
    X = int(input())
    # O(1)解法
    quo = X//100
    mo_ = X % 100
    # 0 <= Xを100で割った余り <= 5 * Xを100で割った時の商 (最大で、5 * 商まで表せれるから)
    if 0 <= mo_ <= 5*quo:
        print(1)
    else:
        print(0)

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