Problem:


Score: 300 points

Problem Statement

AtCoder Mart sells 1000000 of each of the six items below:

Riceballs, priced at 100 yen (the currency of Japan) each

Sandwiches, priced at 101 yen each

Cookies, priced at 102 yen each

Cakes, priced at 103 yen each

Candies, priced at 104 yen each

Computers, priced at 105 yen each

Takahashi wants to buy some of them that cost exactly X yen in total.
Determine whether this is possible.

(Ignore consumption tax.)

Constraints

1 \leq X \leq 100000

X is an integer.

Input

Input is given from Standard Input in the following format:

X

Output

If it is possible to buy some set of items that cost exactly X yen in total, print 1; otherwise, print 0.

Sample Input 1

615

Sample Output 1

1

For example, we can buy one of each kind of item, which will cost 100+101+102+103+104+105=615 yen in total.

Sample Input 2

217

Sample Output 2

0

No set of items costs 217 yen in total.



Sample input:
615


Sample output:
1

Submission status: Accepted

Solution code:
x = int(input())

d = x // 100
r = x % 100

if (r / 5) <= d:
    print(1)
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())
    n = X // 100
    remain = X - n * 100
    if remain <= 5 * n:
        print(1)
    else:
        print(0)
    # print(remain, n)



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())

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

for j in range(100, x + 1):
    for t in range(100, 105 + 1):
        if j - t >= 0:
            dp[j] = dp[j] or dp[j - t]

print(1 if dp[x] else 0)

Submission status: Accepted

Solution code:

X = int(input())
for i in range(1001):
    if i * 100 <= X <= i * 100 + i * 5:
        print(1)
        exit(0)
print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
for i in range(1,1001):
    if n>=i*100 and i*105>=n:
        print(1)
        break
else:
    print(0)

Submission status: Accepted

Solution code:
from sys import stdin

X = int(stdin.readline().rstrip())

if X < 100:
    print(0)
    exit()
num = X // 100
s = X % 100
if s > 5 * num and X < 2000:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
x = int(input())

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

min_x = (x // 100) * 100
max_x = min_x + (x // 100) * 5

if min_x <= x and max_x >= x:
    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:
import sys
input = sys.stdin.readline
x = int(input())
for oni in range(1001):
    cnt = oni * 100
    if cnt > x:
        break
    for sand in range(1001):
        cnt2 = cnt
        cnt2 += sand * 101
        if cnt2 > x:
            break
        for cookie in range(1001):
            cnt3 = cnt2
            cnt3 += cookie * 102
            if cnt3 > x:
                break
            for cake in range(1001):
                cnt4 = cnt3
                cnt4 += cake * 103
                if cnt4 > x:
                    break
                for candy in range(1001):
                    cnt5 = cnt4
                    cnt5 += candy *104
                    if cnt5 > x:
                        break
                    for pc in range(1001):
                        cnt6 = cnt5
                        cnt6 += pc * 105
                        if cnt6 == x:
                            print(1)
                            exit()
                        elif cnt6 > x:
                            break
print(0)

Submission status: Accepted

Solution code:
X=int(input())

t=X//100

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

Submission status: Accepted

Solution code:
n = int(input())

ans = 1
ng_list = [(-1,100)] + [ (105*i, 100*(i+1)) for i in range(1,20) ]
for a, b in ng_list:
    if a < n < b:
        ans = 0
        break
print(ans)

Submission status: Accepted

Solution code:
X = int(input())
if X >= 100:
    first = int(str(X)[:-2])

    last = int(str(X)[-2:])
    p = [0 for i in range(6)]
    for i in range(5,0,-1):
        p[i] = last // i
        last = last - p[i] * i
    sump = sum(p)
    if first >= sump:
        print(1)
    else:
        print(0)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())

A = X // 100
B = X % 100

if A == 0:
    print(0)
elif 1 <= A <= 20:
    if B <= 5 * A:
        print(1)
    else:
        print(0)
else:
    print(1)

Submission status: Accepted

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


def solve(X: int):
    for n in range(X//100-50,X//100+1):
        if n*105 >= X >= n*100:
            print(1)
            return
    print(0)
    return


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())
check = [False for i in range(105001)]
for i in range(1000):
    for j in range(i*100, i*105+1):
    	check[j] = True
print(int(check[X]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inpl = lambda: list(map(int,input().split()))
X = int(input())
if X < 100:
    print(0)
    exit()
elif X <= 105:
    print(1)
    exit()
dp = [False]*(X+1)
goods = list(range(100,106))
dp[0] = True
for k in goods:
    dp[k] = True

for i in range(200, X+1):
    for k in goods:
        if dp[i-k]:
            dp[i] = True
            break
if dp[X]:
    print(1)
else:
    print(0)

Submission status: Accepted

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

def _i(): return int(sys.stdin.readline().strip())

n = _i()
nmin = n//100
mod = n%100
m = 0
for i in range(5,0,-1):
    num = mod // i
    m += num
    mod-= num*i
#
if nmin>=m: print(1)
else: print(0)

Submission status: Accepted

Solution code:
X = int(input())

while X >= 0:
    a = X % 100
    b = X // 100
    if a == 0:
        print(1)
        exit()
    X -= 100
    X -= min(5, a)
print(0)

Submission status: Accepted

Solution code:
X = int(input())
if X < 100:
    print(0)
    exit()
A = X % 100
cnt = 0
cnt += (A // 5)
A %= 5
cnt += (A // 4)
A %= 4
cnt += (A // 3)
A %= 3
cnt += (A // 2)
A %= 2
cnt += (A // 1) 


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

a = [100, 101, 102, 103, 104, 105]
m = [1000000 for _ in range(6)]
dp = [-1 for _ in range(x+1)]

dp[0] = 0
for i in range(6):
    for j in range(x+1):
        if dp[j] >= 0:
            dp[j] = m[i]
        elif j < a[i] or dp[j-a[i]] <= 0:
            dp[j] = -1
        else:
            dp[j] = dp[j-a[i]]-1

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

Submission status: Accepted

Solution code:
X = int(input())

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

Submission status: Accepted

Solution code:
x = int(input())

onigiri_num = x // 100
sub = x % 100

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = input()
if len(X) <= 2:
    print(0)
    exit()
a = int(X[:-2])
b = int(X[-2:])
if b <= a * 5:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
x = int(input())

for i in range(1,1001):
    k = x-100*i
    if k >= 0 and k <= 5*i:
        print(1)
        exit()
print(0)

Submission status: Accepted

Solution code:
x = int(input())
dp = [0 for i in range(x+1)]
items = [100, 101, 102, 103, 104, 105]
for item in items:
    for i in range(item, x+1):
        if dp[i] < dp[i-item] + item:
            dp[i] = dp[i-item] + item

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def solver(x: int):
    if x < 100:
        return 0
    n = x // 100
    m = x % 100
    for _ in range(n):
        if m > 5:
            m -= 5
        else:
            return 1

    if m == 0:
        return 1
    else:
        return 0


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
n = input()
if len(n) <= 2:
    print(0)
    exit()
#n = str(n)[len(n)-3:]
#print(n)
k = int(n[:len(n)-2])
l = int(n[len(n)-2:])
#print(k,l)
if l <= 5*k:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())  
sup=1000000
num=N//100
if 100*num<=N<=105*num and num<=sup:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
n = input()
if len(n) >= 3:
    num = int(n[0:-2])
    yen = int(n[-2::])
    if num * 5 >= yen:
        print(1)
    else:
        print(0)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())

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

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

Submission status: Accepted

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

    if X < 100:
        ans = 0
    else:
        X = str(X)
        under2 = int(X[-2] + X[-1])
        X = int(X)
        if under2 <= 5:
            ans = 1
        else:
            cnt = 0
            while under2 > 5:
                under2 -= 5
                cnt += 1
            cnt += 1

            if X >= cnt * 100:
                ans = 1
            else:
                ans = 0
    
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X = int(input())
count = 0
while X >= 100:
    X -= 100
    count += 1

if count * 5 >= X:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

if ama>5*ko:
    print('0')
else:
    print('1')

Submission status: Accepted

Solution code:
x=int(input())

x_ni=x%100

if x<100:
    print(0)
else:
    x_go=x_ni//5
    if x_ni%5==0:
        hituyou=x_go
    else:
        hituyou=x_go+1
    if x//100>=hituyou:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
import math

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

    a = X // 100
    b = X - 100 * a
    # print(b, a)
    if b > a * 5:
        print(0)
    else:
        print(1)




if __name__ == "__main__":
    main()

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:
# -*- coding: utf-8 -*-
N = int(input())

if N // 100 > N // 105:
    print(1)
elif N % 105 == 0:
    print(1)
else:
    print(0)

Submission status: Accepted

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


def main():
    sc = Scan()
    X = sc.intarr()[0]

    a = X // 100
    b = X - (a*100)

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


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


def display(array):
    for a in range(len(array)):
        if len(array) - a != 1:
            print(array[a], end=' ')
        else:
            print(array[a])


main()

Submission status: Accepted

Solution code:
x = int(input())

n = x // 100
r = x - 100*n

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

Submission status: Accepted

Solution code:
x = int(input())
dp = [0]*(x+20)
for i in range(100,x+10):
    if 100<=i and i<=105:
        dp[i] = 1
        continue

    for j in range(0,6):
        if dp[i-100-j]==1:
            dp[i] = 1
            break
        else:
            continue
print(dp[x])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
x = int(input())
num = x // 100
amari = x % 100
# print(num,amari)
print(1 if math.ceil(amari/5) <= num else 0)

Submission status: Accepted

Solution code:
#import sys
MOD = 10 ** 9 + 7
#input = sys.stdin.readline
import math

#import bisect

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def main():
#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]
    x=int(input())
    kaisu=x//100
    if x >=100:
        simo2=int(str(x)[-2]+str(x)[-1])
    else:
        simo2=0
 #   print(simo2)

    a=0
 #   print(simo2%5,kaisu,kaisu*5)
    if simo2>kaisu*5:
        a=0
    else:
        a=1
    if x<100:
        a=0
    print(a)

#    print(n,kingaku(a,b,x))

if __name__ == "__main__":
    main()

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 x in range(106,X+1):
  dp[x] = int(any(dp[x-105:x-99]))

print(dp[X])

Submission status: Accepted

Solution code:
x = int(input())
if 1 <= x and x <= 99:
  print(0)
  exit()
elif 106 <= x and x <= 199:
  print(0)
  exit()
elif 211 <= x and x <= 299:
  print(0)
  exit()
elif 316 <= x and x <= 399:
  print(0)
  exit()
elif 421 <= x and x <= 499:
  print(0)
  exit()
elif 526 <= x and x <= 599:
  print(0)
  exit()
elif 631 <= x and x <= 699:
  print(0)
  exit()
elif 736 <= x and x <= 799:
  print(0)
  exit()
elif 841 <= x and x <= 899:
  print(0)
  exit()
elif 946 <= x and x <= 999:
  print(0)
  exit()
elif 1051 <= x and x <= 1099:
  print(0)
  exit()
elif 1156 <= x and x <= 1199:
  print(0)
  exit()
elif 1261 <= x and x <= 1299:
  print(0)
  exit()
elif 1366 <= x and x <= 1399:
  print(0)
  exit()
elif 1471 <= x and x <= 1499:
  print(0)
  exit()
elif 1576 <= x and x <= 1599:
  print(0)
  exit()
elif 1681 <= x and x <= 1699:
  print(0)
  exit()
elif 1786 <= x and x <= 1799:
  print(0)
  exit()
elif 1891 <= x and x <= 1899:
  print(0)
  exit()
elif 1996 <= x and x <= 1999:
  print(0)
  exit()
else:
  print(1)
  exit()

Submission status: Accepted

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

def calc(x):
    if x < 100:
        return 0
    mod = x % 100
    max_cnt = x // 100
    if math.ceil(mod/5) <= max_cnt:
        return 1
    return 0

print(calc(X))

Submission status: Accepted

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

Submission status: Accepted

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

a = x%100
b = x//100

m = math.ceil(a/5.0)

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(5,0,-1):
  tmp_n = x//i
  n -= tmp_n
  x -= tmp_n*i

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

n = X // 100
a = X % 100

if n == 0:
    print('0')
    exit()

for i in range(5, 0, -1):
    ni = a // i
    ai = a % i
    if ni > n:
        print('0')
        break
    n -= ni
    a = ai
    if a == 0:
        print(1)
        break

Submission status: Accepted

Solution code:
x = int(input())

s = x//100

t = s*5

res = x - 100*s

if res <= t:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
X = int(input())

l2 = X % 100
h = X // 100

n = 0
if l2 > 5:
    k = l2 // 5
    n += k
    l2 %= 5
if l2 > 0:
    n += 1

if h >= n:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())
N = X // 100
M = X % 100
ans = 0
for i in range(5, 0, -1):
    ans += M // i
    M %= i
if ans <= N:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())
n = X // 100
N = X // 105
mX = n * 100
MX = n * 100 + 5 * n

if mX <= X <= MX:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())

a = X // 100
b = X % 100

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

Submission status: Accepted

Solution code:
x = int(input())

upp = x // 100
rem = x % 100

n5  = rem // 5
rem = rem % 5

n4  = rem // 4
rem = rem % 4

n3  = rem // 3
rem = rem % 3

n2  = rem // 2
rem = rem % 2

n1  = rem

sumn = n1 + n2 + n3 + n4 + n5

if upp >= sumn:
  print('1')
else:
  print('0')

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

X = int(input())
if X>=2000:
    print(1)
else:
    a = X//100
    b = X%100
    c = a*5
    if b>c:
        print(0)
    else:
        print(1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

right=n//100
left=n//105-1

while left<=right:

    middle=(left+right)//2
    #print(middle)
    if 100*middle<=n and n<=105*middle:
        print(1)
        exit()
    elif n<100*middle:
        right=middle
    else:
        left=middle+1
print(0)

Submission status: Accepted

Solution code:
a = int(input())
tmp01 = a/100
tmp02 = a/105

if not a%100 or not a%105:
    print(1)
elif int(tmp01) == int(tmp02):
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
x = int(input())

if x >= 2100:
    print(1)
else:
    _a = x//100
    if _a*100 <= x <= _a*105:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
X = int(input())
d100 = X // 100
Xm = X % 100

for y2 in range(0, 51):
    for y3 in range(0, 34):
        for y4 in range(0, 26):
            for y5 in range(0, 21):
                if y2 + y3 + y4 + y5 > d100:
                    continue

                y1 = Xm - ((2 * y2) + (3 * y3) + (4 * y4) + (5 * y5))
                if y1 < 0:
                    continue

                if 101 * y1 + 102 * y2 + 103 * y3 + 104 * y4 + 105 * y5 > X:
                    continue

                if (X - (101 * y1 + 102 * y2 + 103 * y3 + 104 * y4 + 105 * y5)) % 100 == 0:
                    print(1)
                    exit()

print(0)

Submission status: Accepted

Solution code:
x = int(input())

a = x // 100
b = (x % 100) / 5
print(0 if (a < b) else 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def main():
    X = int(input())
    A = [False]*(110000)
    A[100] = True
    A[101] = True
    A[102] = True
    A[103] = True
    A[104] = True
    A[105] = True
    for i in range(100,X+1):
        if A[i]:
            A[i+100] = True
            A[i+101] = True
            A[i+102] = True
            A[i+103] = True
            A[i+104] = True
            A[i+105] = True
    if A[X]:
        print(1)
    else:
        print(0)
    return 

main()

Submission status: Accepted

Solution code:
x = int(input())
a = x % 100
a5 = a // 5
x5 = a - 5*a5
a4 = x5 // 4
x4 = x5 - 4*a4
a3 = x4 // 3
x3 = x4 - 3*a3
a2 = x3 // 2
x2 = x3 - 2*a2
a1 = x2 // 1
x1 = x2 - 4*a1
aaa = a1 + a2 + a3 + a4 + a5
xxx = (x - a) // 100
if xxx < aaa:
  print(0)
else:
  print(1)

Submission status: Accepted

Solution code:
x = int(input())
rem = x%100
flag = False
while x > 0:
  if rem >= 5:
    rem -= 5
    x -= 105
  elif rem == 4:
    rem -= 4
    x -= 104
  elif rem == 3:
    rem -= 3
    x -= 103
  elif rem == 2:
    rem -= 2
    x -= 102
  elif rem == 1:
    rem -= 1
    x -= 101
  else:
    x -= 100
if x == 0:
  flag = True
if flag:
  print('1')
else:
  print('0')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

kosu = x//100
amari = x%100

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

Submission status: Accepted

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

s = 0
for i in range(n):
    s += min(rem - s, 5)
    if s == rem:
        print("1")
        exit()
print("0")

Submission status: Accepted

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

import math
import itertools

# 入力
X = int(input())
#S = str(input())
#M1, D1 = map(int, input().split())


if math.floor(X/100)*5 >= X%100 :
  print (1)
else :
  print (0)

Submission status: Accepted

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

x = int(input())

two_bit = x%100
five = two_bit//5
two_bit-= 5*five
if two_bit==0:
    amari = 0
else:
    amari = 1
if (five+amari) <= x//100:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())
A = X // 100 * 100
B = A * 1.05
if A <= X <= B:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
x=int(input())
dp=[False for i in range(x+1)]
dp[0]=True

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

r = n%100
h = (n-r)//100

print((r<=(h*5))*1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = str(input())

#末尾2桁を取り出す
last2 = int(X[len(X)-2::])

#last2をできるだけ少ないものの個数で処理する
pc = last2//5
last2 = last2 % 5
candy = last2//4
last2 = last2 % 4
cake = last2//3
last2 = last2 % 3
cookie = last2//2
last2 = last2 % 2
sandwitch = last2//1
last2 = last2 % 1

X = int(X)-105*pc-104*candy-103*cake-102*cookie-101*sandwitch

if X%100==0 and X>=0:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
x = int(input())

n1 = x // 100
n2 = x % 100

if 5 * n1 >= n2:
    print(1)
else:
    print(0)

Submission status: Accepted

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

num = X // 100

if num * 5 < X - num * 100:
	print(0)
else:
	print(1)

Submission status: Accepted

Solution code:
# coding: utf-8
x = int(input())
min_need = 0
tmp = x % 100
min_need += tmp // 5
if tmp % 5:
    min_need += 1

if min_need * 100 < x:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())

Y = X // 100
Z = X % 100

if Y >= 20:
    ans = 1
else:
    if Z % 5 != 0:
        A = (Z // 5) + 1
    else:
        A = Z // 5

    if A <= Y:
        ans = 1
    else:
        ans = 0
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))
X = int(input())
prices = [100,101,102,103,104,105]


dp = [0 for i in range(2002)]
for price in prices:
    dp[price] = 1
for i in range(len(dp)):
    for price in prices:
        if i > price and dp[i-price] == 1:
            dp[i] = 1

if X > 2000:
    print("1")
else:
    print(dp[X])

Submission status: Accepted

Solution code:
n = int(input())

if(n%100==0):
    print(1)
elif(n%101==0):
    print(1)
elif(n%102==0):
    print(1)
elif(n%103==0):
    print(1)
elif(n%104==0):
    print(1)
elif(n%105==0):
    print(1)
else:
    tmp=n//100
    mod=n%100/5
    if(mod<tmp):
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    n = II()
    tmp = n // 100
    if n - tmp * 100 <= tmp * 5:
        print(1)
        return
    print(0)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = int(input())

k = math.floor(n/100)
l = n - 100*k
m = k*5

if l <=  m:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:

a = int(input())

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

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(10**9)
X = int(input())

ITEM = [100, 101, 102, 103, 104, 105]
def restricted_part_sum(a,A):
  #初期化
  N=len(a)
  dp=[[-1 for i in range(A+1)] for j in range(N+1)]
  dp[0][0]=0

  #DP
  for i in range(N):
    for j in range(A+1):
      if dp[i][j]>=0:
          dp[i+1][j]=1000000
      elif j<a[i] or dp[i+1][j-a[i]]<=0:
          dp[i+1][j]=-1
      else:
          dp[i+1][j]=dp[i+1][j-a[i]]-1
  return int(dp[N][A]>=0)


ret = restricted_part_sum(ITEM, X)
print(ret)

Submission status: Accepted

Solution code:
# coding: utf-8
#  100: 100-105
#  200: 200-210
#  300: 300-315

# 1000:1000-1050
# 2000:2000-2100

x = int(input())

if x >= 2000:
    ans = 1
else:
    n = x // 100
    if x <= n * 105:
        ans = 1
    else:
        ans = 0

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
from itertools import combinations_with_replacement

x = int(stdin.readline().rstrip())

li = [0,1,2,3,4,5]

kosuu = x//100
amari = x%100

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

ans = 1
for N in range(1, 10001):
    X_min = 100 * N
    X_max = 105 * N
    # print("#", N, X_min, X_max)
    if X_min <= X <= X_max: break
else:
    ans = 0

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

import sys
sys.setrecursionlimit(10 ** 9)

memo = [-1] * (N + 1)

def dfs(x):
    if x >= 0 and memo[x] != -1:
        return memo[x]
    ans = False
    if x == 0:
        memo[x] = 1
        return True
    elif x < 0:
        return False
    else:
        ans |= dfs(x - 100)
        ans |= dfs(x - 101)
        ans |= dfs(x - 102)
        ans |= dfs(x - 103)
        ans |= dfs(x - 104)
        ans |= dfs(x - 105)
    memo[x] = 1 if ans else 0
    return ans
if dfs(N):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:

N = int(input())

M = N//100
if (N>=100*M) and (N<= 105*M):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = input()

last2 = int(X[len(X)-2:])
try_num = int(X) //100

for i in range(try_num):
    if last2 > 5:
        last2 -= 5
    else:
        print(1)
        exit(0)
print(0)

Submission status: Accepted

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

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

if b == 0:
    print(1)
    exit()

for n in [5,4,3,2,1,0]:
    if a == 0:
        print(0)
        exit()

    tmp = b // n
    
    b -= min(a, tmp)*n
    a -= min(a, tmp)

    if b == 0:
        print(1)
        exit()