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:
from __future__ import print_function
# import numpy as np
# import numpypy as np
import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd

def lcm(n,m):
    return int(n*m/gcd(n,m))

import re
import array
import copy
import functools
import operator

import collections
import itertools
import bisect
import heapq


from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace

from queue import PriorityQueue as pq

def reduce(p, q):
    common = fractions.gcd(p, q)
    return (p//common , q//common )
# from itertools import accumulate
# from collections import deque

import random
import traceback

def main():
    x = int(input().strip())
    x_left=x%100                # x_leftはxの二桁目以下(0<=x_left<=99)
    x_d3above=x//100            # x_leftはxの三桁目以上(0<=x_d3above<=10^3)

    x_d1 = x_left % 10              # Xの一桁目
    x_d2 = x_left //10              # Xの二桁目

    sideEffect=0
    if x_d1==1:
        sideEffect+=100
    elif x_d1==2:
        sideEffect+=100
    elif x_d1==3:
        sideEffect+=100
    elif x_d1==4:
        sideEffect+=100
    elif x_d1==5:
        sideEffect+=100
    elif x_d1==6:
        sideEffect+=200
    elif x_d1==7:
        sideEffect+=200
    elif x_d1==8:
        sideEffect+=200
    elif x_d1==9:
        sideEffect+=200
    elif x_d1==0:
        pass
    else:
        eprint(x_d1)
        try:
            raise Exception
        except:
            traceback.print_exc("error!")

    if x_d2==1:
        sideEffect+=200
    elif x_d2==2:
        sideEffect+=400
    elif x_d2==3:
        sideEffect+=600
    elif x_d2==4:
        sideEffect+=800
    elif x_d2==5:
        sideEffect+=1000
    elif x_d2==6:
        sideEffect+=1200
    elif x_d2==7:
        sideEffect+=1400
    elif x_d2==8:
        sideEffect+=1600
    elif x_d2==9:
        sideEffect+=1800
    elif x_d2==0:
        pass
    else:
        eprint(x_d2)
        try:
            raise Exception
        except:
            traceback.print_exc()

    if (x//100)*100 < sideEffect:
        print(0)
    else:
        print(1)
        
    
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X = int(input())

Data = [0]*(X+1)
Data[0] = 1

for c in range(100,106):
    for i in range(X+1):
        if Data[i] == 1:
            n = 1
            while c*n + i <= X:
                Data[c*n+i] = 1
                n+=1
if Data[X] == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys
x=(input())
ls = [101,102,103,104,105]
if int(x) < 100:
    print(0)
else:
    t = int(x[:-2])
    x = int(x)
    c = 0
    while True:
        if x <= 100:
            break
        x -=105
        c += 1

    if x+105 in ls:
        print(1)
    elif c == t:
        print(0)
    else:
        print(1)

Submission status: Accepted

Solution code:
x = int(input())


temp = x % 100
x = x - 105 * int(temp / 5)
temp = x % 100
x = x - 104 * int(temp / 4)
temp = x % 100
x = x - 103 * int(temp / 3)
temp = x % 100
x = x - 102 * int(temp / 2)
temp = x % 100
x = x - 101 * int(temp / 1)

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

Submission status: Accepted

Solution code:
X = int(input())

max_a = X // 100 + 1
max_n = max_a


def sum_X(n_list):
    x = sum([n * (100 + i) for i, n in enumerate(n_list)])
    return x


for a in range(max_a):
    if a > max_n:
        break
    for b in range(max_a):
        n = sum([a, b])
        if n > max_n:
            break
        for c in range(max_a):
            n = sum([a, b, c])
            if n > max_n:
                break
            for d in range(max_a):
                n = sum([a, b, c, d])
                if n > max_n:
                    break
                for e in range(max_a):
                    n = sum([a, b, c, d, e])
                    if n > max_n:
                        break
                    for f in range(max_a):
                        n = sum([a, b, c, d, e, f])
                        if n > max_n:
                            break
                        if X == sum_X([a, b, c, d, e, f]):
                            print(1)
                            exit()
print(0)

Submission status: Accepted

Solution code:
import math

N = int(input())

a=N%100
b=N//100

x=a//5
y=a%5

if y ==4:
  x+=2
elif y==3 or y==2 or y==1:
  x+=1

#print(b,x)
if b>=x:
  print("1")
else:
  print("0")

Submission status: Accepted

Solution code:
x = int(input())
if x >= 2000:
    print(1)
    exit(0)
else:
    for i in range(0,21):
        if 105*i + 1 <= x <= 99 + i*100:
            print(0)
            exit(0)
        else:
            pass
    print(1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

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

elif 2000 <= x:
    print(1)
    exit(0)

n = int(x/100)

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

Submission status: Accepted

Solution code:
a = int(input())
num = a // 100
num2 = a//105
num3 = a%100
num4 = a%105
if 5*num >= num3:
	print(1)
else:
	print(0)

Submission status: Accepted

Solution code:
x=int(input())
items = [100,101,102,103,104,105]
list = [1]
if x == 100 or x == 101 or x == 102 or x == 103 or x == 104 or x == 105:
    print(1)
elif x <100:
    print(0)
else:
    for i in range(99):
        list.append(0)
    for i in range(6):
        list.append(1)
    for i in range(94):
        list.append(0)
    for i in range(200,x+1):
        for item in items:
            if list[i-item] == 1:
                list.append(1)
                break
        else:
            list.append(0)

    print(list[x])

Submission status: Accepted

Solution code:
from itertools import permutations, combinations,combinations_with_replacement,product

X =int(input())

s =str(X/100)

s_list =s.split('.')

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

for h in range(1,int(s_list[0])+1):
    for i in combinations_with_replacement(A,h):
        if sum(i) == int(s_list[1]):
            #print(i)
            print("1")
            exit()

print("0")

Submission status: Accepted

Solution code:
N = int(input())
if N in [100,101,102,103,104,105]:
    print(1)
else:
    x = N%100
    xx = N//100
    y = x%5
    yy = x//5
    if y == 0 and xx-yy >= 0:
        print(1)
    elif  xx-yy>=1:
        print(1)
    else:
        print(0)

Submission status: Accepted

Solution code:
from itertools import combinations
import sys
"""
10の６条
ijklm
"""

X = int(input())
P = [1, 2, 3, 4, 5]

if 1 <= X <= 99:
    print("0")
    sys.exit(0)

a = X % 100
b = X // 100

if a == 0:
    print("1")
    sys.exit(0)

for i in range(20):
    for j in range(25):
        for k in range(34):
            for l in range(50):
                ans = 5 * i + 4 * j + 3 * k + 2 * l
                if a -ans <= b - (i + j + k + l) and a - ans >= 0:
                    print("1")
                    sys.exit(0)
print('0')

Submission status: Accepted

Solution code:
def solve():
    X = int(input())
    
    if X < 100:
        return 0
    
    upper1 = X // 100
    for p1 in range(0, 100 * upper1 + 1, 100):
        rest1 = X - p1
        if rest1 == 0:
            return 1
        upper2 = rest1 // 101
        for p2 in range(0, 101 * upper2 + 1, 101):
            rest2 = rest1 - p2
            if rest2 == 0:
                return 1
            upper3 = rest2 // 102
            for p3 in range(0, 102 * upper3 + 1, 102):
                rest3 = rest2 - p3
                if rest3 == 0:
                    return 1
                upper4 = rest3 // 103
                for p4 in range(0, 103 * upper4 + 1, 103):
                    rest4 = rest3 - p4
                    if rest4 == 0:
                        return 1
                    upper5 = rest4 // 104
                    for p5 in range(0, 104 * upper5 + 1, 104):
                        rest5 = rest4 - p5
                        if rest5 == 0:
                            return 1
                        upper6 = rest5 // 105
                        for p6 in range(0, 105 * upper6 + 1, 105):
                            rest6 = rest5 - p6
                            if rest6 == 0:
                                return 1
    else:
        return 0

print(solve())

Submission status: Accepted

Solution code:
x = input()
x2 = int(x[-2:])
x = int(x)
c = 0
for i in [5,4,3,2,1]:
    a, b = divmod(x2, i)
    c = c+a
    x2 = b
if x2 == 0:
    print(1 if 100*c < x else 0)
else:
    print(0)

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
x = int(input())

a = x // 100
n = x % 100

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

Submission status: Accepted

Solution code:
n = input()

digit = len(n)
num = int(n)

min = 0
if digit == 3:
  min = int(n[0] + '00')
elif digit == 4:
  min = int(n[0] + n[1] + '00')
elif digit == 5:
  min = int(n[0] + n[1] + n[2] + '00')
elif digit == 6:
  min = int(n[0] + n[1] + n[2] + n[3] + '00')
else:
  min = 9999999999
  
max = min * 1.05
if num >= min and num <= max:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
def main():
    X = input()
    if(len(X)<3):
        print(0)
        return
    last = int(X[:len(X)-2])
    two = int(X[-2:])
    if two <= last*5:
        print(1)
    else:
        print(0)

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
ans=1
for i in range(21):
    if 105*i<N<100*(i+1):ans=0

print(ans)

Submission status: Accepted

Solution code:
X=input()
Xi=int(X)
if Xi>=100:
    if len(X)>=4 and Xi>=2000:
        print(1)
    else:
        if Xi<1000:
            print(1 if int(X[0])*5>=int(X[1:3]) else 0)
        else:
            print(1 if int(X[0:2])*5>=int(X[2:4]) else 0)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())
l = [100, 101, 102, 103, 104, 105]
N = X // 100
flag = 0

import itertools
for c in itertools.combinations_with_replacement(l, N):
    if sum(c) == X:
        flag = 1
        break

print(flag)

Submission status: Accepted

Solution code:
def main():
    # map(int, input().split())
    # l = list(map(int, input().split()))
    X = int(input())
    rest = X
    flag = False
    for i in range(1000001):
        if rest == 0 or rest % 100 == 0:
            flag = True
            break
        elif rest < 100:
            flag = False
            break
        amari = rest % 100
        if amari >= 5:
            rest -= 105
        elif amari >= 4:
            rest -= 104
        elif amari >= 3:
            rest -= 103
        elif amari >= 2:
            rest -= 102
        elif amari >= 1:
            rest -= 101
    print(1 if flag else 0)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def func(X):
  max_X = int(X / 100)+1
  #print(max_X)
  #min_X = int(X / 105)
  #print(min_X)
  #print(max_X)
  for x1 in range(max_X+1):
    for x2 in range(max_X+1):
      if x1 + x2 > max_X: break
      for x3 in range(max_X+1):
        if x1 + x2 + x3 > max_X: break
        for x4 in range(max_X+1):
          if x1 + x2 + x3 + x4 > max_X: break
          for x5 in range(max_X+1):
            if x1 + x2 + x3 + x4 + x5 > max_X: break
            for x6 in range(max_X+1):
              #print(x1,x2,x3,x4,x5,x6)
              if x1*100 + x2*101 + x3*102 + x4*103 + x5*104 + x6*105 == X:
                print("1")
                return
  print("0")

X = int(input())
func(X)

Submission status: Accepted

Solution code:
X=int(input())
m=X%100
nmin=0
for i in range(5,0,-1):
    nmin+=m//i
    m=m-(m//i)*i
if nmin>(X//100):
    print("0")
else:
    print("1")

Submission status: Accepted

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

Submission status: Accepted

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

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

for item in lis:
    if X % item == 0:
        print(1)
        sys.exit()

if X >= 2000:
    print(1)
    sys.exit()

for x in range(1, 20):
    if 100 * x <= X <= 105 * x:
        print(1)
        sys.exit()
print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''import math
n = int(input())
x = n//1.08
o = math.floor(x*1.08)
s = math.floor((x+1)*1.08)
t = math.floor((x-1)*1.08)
if(o!=n and s!=n and t!=n):
    print(":(")
else:
    print(x)
'''
a = [0]*100001
a[0]=1
ls = [100,101,102,103,104,105]
for i in range(0,len(ls)):
    for j in range(ls[i],100001):
        a[j]+=a[j-ls[i]]
n=int(input())
if(a[n]):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys
x = int(input())
n = x % 100
maxbuy = x // 100
ans = 0
if maxbuy > 99:
	print(1)
	sys.exit()
ans += n//5
n %= 5
ans += n//4
n %= 4
ans += n//3
n %= 3
ans += n//2
n %= 2
if n == 1:
	if ans+1 <= maxbuy:
		print(1)
	else:
		print(0)
else:
	if ans <= maxbuy:
		print(1)
	else:
		print(0)

Submission status: Accepted

Solution code:
X = int(input())
a = ( X // 105 ) + 1
small = a * 100
big = a * 105
if small <= X and X <= big:
    print(1)
elif X % 105 == 0:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
# 2019/12/1

x=int(input())
n,mod=divmod(x,100)
print(1 if n*5>=mod else 0)

Submission status: Accepted

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

item = int(x / 105) + 2

for a in range(item) :
    for b in range(item - a) :
        for c in range(item - a - b) :
            for d in range(item - a - b - c) :
                for e in range(item - a - b - c - d) :
                    for f in range(item - a - b - c - d -e) :
                        if 100*a + 101*b  + 102*c + 103*d + 104*e + 105*f == x :
                            print("1")
                            sys.exit()
print("0")

Submission status: Accepted

Solution code:
#!python3.4.3

x_str = input()
x = int(x_str)

if x < 100:
    print(0)
else:
    a = int(x_str[:-2])
    b = int(x_str[-2:])

    if a > b:
        print(1)
    else:
        count = 0
        d = b
        for i in range(5, 0, -1):
            c = d // i
            count += c
            if a < count:
                print(0)
                break
            if d % i == 0:
                print(1)
                break
            d = d - c*i

Submission status: Accepted

Solution code:
X = int(input())
ans = 0
tmp = str(X)
if len(tmp) > 2:
    upper = int(tmp[:-2])
    under = int(tmp[-2:])
    if upper * 5 < under:
        ans = 0
    else:
        ans = 1
else:
    ans = 0

print(ans)

Submission status: Accepted

Solution code:
#入力
N=int(input())

top   = N // 100
under = N % 100


for i in range(top):
    #print(i,under)
    if(under == 0):
        break
    elif(under - 5 >= 0):
        under -= 5
    elif(under - 4 >= 0):
        under -= 4
    elif (under - 3 >= 0):
        under -= 3
    elif (under - 2 >= 0):
        under -= 2
    elif (under - 1 >= 0):
        under -= 1


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

Submission status: Accepted

Solution code:
X = int(input())

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

Submission status: Accepted

Solution code:
X = int(input())

prices = (100, 101, 102, 103, 104, 105)
M = (10000, 10000, 10000, 10000, 10000, 10000)


def restricted_part_sum(a, m, 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] = m[i]
            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 dp[N][A] >= 0


if restricted_part_sum(prices, M, X):
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
X = int(input())

X1 = X % 100

counter = 0
minusV = 5
while(X1 != 0):
    if(X1 - minusV >= 0):
        X1 = X1 - minusV
        counter += 1
    else:
        minusV -= 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N=int(input())

X = math.floor(N / 100) + 1
ans = 0

for i in range(X):
  a = i * 100
  b = i * 105
  if a <= N and N <= b:
    ans = 1
    
print(ans)

Submission status: Accepted

Solution code:
X = input()

Xzero = X.zfill(len(X)+3)
Xzero = Xzero[::-1]

simo = Xzero[0:2]
simo = int(simo[::-1])
kami = Xzero[2:len(Xzero)]
kami = int(kami[::-1])

n = 0
for i in range(20):
    if(simo <= i*5):
        break
    n += 1

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

Submission status: Accepted

Solution code:
a=int(input())
if a>=2100:
    print("1")
else:
    b=a//100#20
    c=a%100 #amari
    for i in range(b):
        c-=5
    if c>0:
        print ("0")
    else:
        print("1")

Submission status: Accepted

Solution code:
"""
n1 = int(input())*100
n2 = n1+99
x = n1//108+1
y = n2//108
print(x,y)
if x >=y:
	print(n2//108)
else:
	print(":(")

"""
x = int(input())
y = x//100
z = x%100
if y*5 >= z:
	print("1")
else:
	print("0")

Submission status: Accepted

Solution code:
# 2019/12/01
# 三井住友信託銀行プログラミングコンテスト2019 - C

# Input
x = int(input())

# Calc
wk_v = x % 100
if wk_v <= int(int(x / 100) * 100 * 0.05):
    ans = 1
else:
    ans = 0

# Output
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X = list(map(int, input().split()))[0]

a1 = int(X / 100)
a2 = int(X / 105)
if a1 == a2 and a2 < (X / 105):
    print(0)
else:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
x_1 = int(x / 100)
x_2 = x - x_1 * 100
sum = 0
for i in range(x_1):
    sum += 5
if sum >= x_2:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

X = int(input())
tmp1 = X // 100
tmp2 = X % 100
ans = 1

if X < 100:
    print(0)
    sys.exit()
if tmp1 == 0:
    print(ans)
    sys.exit()

for i in range(5, 0, -1):
    t1 = tmp2 // i
    t2 = tmp2 % i
    tmp2 = t2
    tmp1 -= t1
    if tmp1 < 0:
        ans = 0
        break

if t2 != 0:
    ans = 0

print(ans)

Submission status: Accepted

Solution code:
x = int(input())
y = x / 100
z = x % 100
counter = 0
for i in [5, 4, 3, 2, 1]:
	while z >= i:
		z -= i
		counter += 1
print(1 if y >= counter else 0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

a = x // 100
b = x - 100*a

c = (b+4)//5

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

Submission status: Accepted

Solution code:
X = int(input())

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

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

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

n = -(-xx//5)

if X > n * 100:
    print('1')
else:
    print('0')

Submission status: Accepted

Solution code:
X = int(input())

items = list(range(100, 106))
MAP = [100000000] * 100001
MAP[0] = 0
PRICE_MAX = 100000

for price in items:
    for i in range(len(MAP)):
        if MAP[i] < PRICE_MAX:
            new_price = min([i + price, PRICE_MAX])
            MAP[new_price] = 1
if MAP[X] < PRICE_MAX:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
x=int(input())
ans=0
if x>=10**4:
  ans=1
elif x<100:
  ans=0
else:
  y=x%100
  for i in range(1,21):
    if (y//(5*i)==0 or y==5*i) and x>=100*i:
      ans=1
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
X = int(input())
val = X % 100
num = X // 100

n1 = val // 5
n2 = val % 5

if(n2 == 0):
  num2 = n1
else:
  num2 = n1 + 1

if(num >= num2):
  print('1')
else:
  print('0')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

target = x % 100
maximum = x // 100

if maximum*5 >= target:
    ans = 1
else:
    ans = 0

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

coin_num = N // 100 + 1
X = N % 100

for i in range(coin_num):
  for j in range(coin_num):
    for k in range(coin_num):
      for l in range(coin_num):
        for m in range(coin_num):
          if i+j+k+l+m <= coin_num-1:
            total = 1*i + 2*j + 3*k + 4*l + 5*m
            #print(total)
            if total == X:
              print(1)
              exit()
            
print(0)

Submission status: Accepted

Solution code:
N = int(input())

P = int(N//100)
Q = N%100

flag = 0

while N > 0:
  P = int(N//100)
  Q = N%100
  
  if(Q <= P*5):
    print(1)
    flag  = 1
    break
  else:
    N -= 2100

if(flag == 0):
  print(0)

Submission status: Accepted

Solution code:
x = int(input())
n = x // 100 + 10
for i1 in range(n+1):
  for i2 in range(n+1-i1+1):
    for i3 in range(n+1-i1-i2+1):
      for i4 in range(n+1-i1-i2-i3+1):
        for i5 in range(n+1-i1-i2-i3-i4+1):
          for i6 in range(n+1-i1-i2-i3-i4-i5+1):
            if 100*i1+101*i2+102*i3+103*i4+104*i5+105*i6 == x:
              if i1<=1000000 and i2<=1000000 and i3<=1000000 and i4<=1000000 and i5<=1000000 and i6<=1000000:
                print(1)
                exit()
print(0)

Submission status: Accepted

Solution code:
X = int(input())
m = [0,0]
flg = 0
m[0] = int(X/100)
m[1] = int(X/105)
while m[0] >= m[1]:
    if X >= int(m[1] * 100) and X <=int(m[1] *105):
        flg = 1
        break
    else:
        m[1] += 1

if flg == 1:
    print("1")
else:
    print("0")

Submission status: Accepted

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

s = x // 100
r = x % 100

print(1 if s * 5 >= r else 0)

Submission status: Accepted

Solution code:
X = int(input())
X_MOD = X % 100
X_DIV = X // 100

import sys
sys.setrecursionlimit(2000)
def dfs(sum_x, cnt_x, num):
    if cnt_x > X_DIV:
        return False
    if sum_x == X_MOD:
        return True

    if num == 1:
        return dfs(sum_x+1, cnt_x+1, 1) or dfs(sum_x+1, cnt_x+2, 2) or dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 2:
        return dfs(sum_x+1, cnt_x+2, 2) or dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 3:
        return dfs(sum_x+3, cnt_x+1, 3) or dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 4:
        return dfs(sum_x+4, cnt_x+1, 4) or dfs(sum_x+5, cnt_x+1, 5)
    if num == 5:
        return dfs(sum_x+5, cnt_x+1, 5)
    

ans = int(dfs(0,0,1))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())

a = X // 100

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

Submission status: Accepted

Solution code:
x = str(input())
lx = len(x)
num = lx - 2
if int(x) >= 100:
    head = int(x[:num])
    body = int(x[num:])
    up = head * 5
    ans = int(0)
    if body <= up:
        ans = 1
    else:
        ans = 0
else:
    ans = 0
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input1 = int(input())
kosu = int(input1 / 100)
amari = input1 % 100


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

Submission status: Accepted

Solution code:
money = [0,1,2,3,4,5]
n = int(input())
p = 0
lm = n//100
need = n - (lm*100)
if n>=100:
    print(1 if lm*5>= need else 0)
else:
    print(0)

Submission status: Accepted

Solution code:
'''
　 ∧_,,∧    究極奥義「WAがACになーれ！！」
　（`・ω・)つ━☆・*。
　⊂　　 ノ 　　　・゜+.
　 し’´Ｊ　　*・ 
'''
import sys
input = sys.stdin.readline
x=int(input())
dp=[0]*(max(x+1,200))
dp[100]=1
dp[101]=1
dp[102]=1
dp[103]=1
dp[104]=1
dp[105]=1
if x<=199:
    print(dp[x])
    exit()
for i in range(200,x+1):
    if dp[i-100]==1 or dp[i-101]==1 or dp[i-102]==1 or dp[i-103]==1 or dp[i-104]==1 or dp[i-105]==1:
        dp[i]=1
print(dp[x])

Submission status: Accepted

Solution code:
X = int(input())

A = X//100

if (X%100)//5 +(X%5!=0) > A:
	print(0)
else:
	print(1)

Submission status: Accepted

Solution code:
#　三井住友C
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
x = ni()
dp = [False for i in range(100002)]

# dp[99]=True
dp[0]=True
dp[100]=True
dp[101]=True
dp[102]=True
dp[103]=True
dp[104]=True
dp[105]=True
for i in range(100,100001):
    if dp[i-100] or dp[i-101] or dp[i-102] or dp[i-103] or dp[i-104] or dp[i-105]:
        dp[i]=True
    else:
        dp[i]=False

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

Submission status: Accepted

Solution code:
from math import floor
x = int(input())
items = floor(x / 100)
if (x - items*100) / 5 <= items:
  print(1)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
for i in range(6)[::-1]:
    while(x % 100 >= i):
        x -= 100
        x -= i
        if(x < 0):
            print(0)
            exit()
        if(x == 0):
            print(1)
            exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def check(X):
    if X < 0 or X % 5 != 0:
        return False
    else:
        flag = False
        for i in range((X//105)+1):
            if (X - i*105) % 100 == 0:
                flag = True
                break
        return flag
X = int(input()) 
for i in range(5**4):
    i_tmp = i
    buylist = [0]*4
    for j in range(len(buylist)):
        buylist[j] = i_tmp % 5
        i_tmp = i_tmp // 5
    buytmp = 101*buylist[0]+102*buylist[1]+103*buylist[2]+104*buylist[3]
    if check(X - buytmp) == True:
        flag = True
        break
    else:
        flag = False
if flag:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

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

n = int(input())

if(n>=2000):
    print(1)
else:
    c = n//100
    p = n%100
    if(p>c*5):
        print(0)
    else:
        print(1)

Submission status: Accepted

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

if n < 100:
    print("0")
elif ni == 0:
    print("1")
else:
    for a in range(ni):
        for b in range(ni):
            for c in range(ni):
                for d in range(ni):
                    for e in range(ni):
                        if a + b*2 + c*3 + d*4 + e*5 == ni :
                            break
                    else:
                        continue
                    break
                else:
                    continue
                break
            else:
                continue
            break
        else:
            continue
        break
    if a+b+c+d+e <=da:
        print("1")
    else:
        print("0")

Submission status: Accepted

Solution code:
X = int(input())
min_N = X // 105
if X % 105 != 0:
    min_N += 1
Max_N = X // 100
dif_N = Max_N - min_N
if dif_N < 0:
    print(0)
else:
    print(1)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False
input = sys.stdin.readline
Xs = input()
X = int(Xs)
if X < 100:
  print("0")
  exit()
X_ = int(Xs[-3:])
_X = int(Xs[0:-3])
if X_ == 0 or X_ == 1 or X_ == 2 or X_ == 3 or X_ == 4 or X_ == 5:
  print("1")
  exit()
count = 0
count += X_ // 5
X_ = X_ %  5
count += X_ //4
X_=X_%4
count += X_ //3
X_=X_%3
count += X_ //2
X_=X_%2
count += X_ //1
X_=X_%1
if _X - count >= 0:
  print("1")
else:
  print("0")
if em: sys.stdin = open('/dev/tty')

Submission status: Accepted

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


number = int(x/100)
number = number+1

for i in range(0,number):
    for j in range(0,number-i):
        for k in  range (0,number-i-j):
            for l in range(0,number-i-j-k):
                for m in range(0,number-i-j-k-l):
                    for n in range(0,number-i-j-k-l-m):
                        if i*100+j*101+k*102+l*103+m*104+n*105==x:
                            print(1)
                            sys.exit()
print(0)

Submission status: Accepted

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

if X >= 2100:
  print(1)
else:
  n=math.floor(X/100)
  if X- n * 100 <=n*5:
    print(1)
  else:
    print(0)

Submission status: Accepted

Solution code:
x=int(input())
over=x//100
d100=x%100
d5=d100//5
d4=(d100%5)//4
d3=((d100%5)%4)//3
d2=(((d100%5)%4)%3)//2
d1=(((d100%5)%4)%3)%2
if over>=d5+d4+d3+d2+d1:
  print(1)
else:
  print(0)