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: Wrong Answer

Solution code:
import sys
import sys
from decimal import Decimal, ROUND_HALF_UP
import math
input = sys.stdin.readline
#sys.setrecursionlimit(1e9)

def main():
    """code here"""
    x=int(input())
    ans = 0
    if (x/100)<1:
        print("0")
    num = math.floor(x/100)

    x = x %1000
    for i in range(10):
        for j in range(10):
            for k in range(10):
                for l in range(10):
                    for p in range(10):
                        ans=x - 100*i-101*j-102*k-103*l-104*p
                        if ans>0 and(ans) %105==0:
                            print("1")
                            exit()


    print("0")



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
n=n%100
n=n%101
n=n%102
n=n%103
n=n%104
n=n%105

print(1 if n==0 else 0)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

X = int(input())

if X % 100 == 0:
    print(1)
    exit()

l = len(str(X))
if l > 3:
    X = X - 10**(l-1)


arr = list(range(101, 106)) + list(range(201, 211)) + list(range(301, 316)) + list(range(401, 421)) + list(range(501, 526)) + \
    list(range(601, 631)) + list(range(701, 736)) + \
    list(range(801, 841)) + list(range(901, 946)) + list(range(1, 46))


if X in arr:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:

X = int(input())

flag = True
cnt=0

N = X//100
V = X-N*100

for i in range(5):
    cnt += V // (5-i)
    V = V % 5
    if V == 0:
        break

if cnt <= N :
    flag = False
    print(1)

if flag:
    N = X//1000
    V = X-N*1000

    for i in range(5):
        cnt += V // (5-i)
        V = V % 5
        if V == 0:
            break

    if cnt<=N:
        flag = False
        print(1)

if flag:
    print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
abl = x // 100
m = x % 100
ans = 0
if x > 9900:
    ans = 1
if x > 99 and int(m / 5 - 0.5) +1 <= abl:
    ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())
count = int(X / 100)
left = X % 100

if left == 0:
    print(1)
elif count * 6 < left:
    print(0)
elif count * 6 == left:
    print(1)
elif count * 6 > left:
    print(1)

Submission status: Wrong Answer

Solution code:
x = int(input())
f = 0

c = x // 100
e = x % 100
mc = c * 5
cnt = 0
i = 6

if e < mc:
    while cnt < mc:
        i -= 1
        cnt += e // i
        e = e % i
        if e == 0:
            f = 1
            break

if f:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# get a integer
def subset_sum(numbers, target, partial=[]):
    s = sum(partial)
    ans = 0
    # check if the partial sum is equals to target
    if s == target:
        return  1
    if s >= target:
        return 0
        # if we reach the number why bother to continue

    for i in range(len(numbers)):
        n = numbers[i]
        remaining = numbers[i + 1:]
        ans = subset_sum(remaining, target, partial + [n])
        if ans ==1:
            break
    return ans

a = int(raw_input())
opt = [100, 101, 102, 103, 104, 105]
rems = []
ans = -1
for i in opt:
    remaining = a % i
    if remaining == 0:
        ans = 1
        break
    else:
        rems.append(remaining)

if ans == 1:
    print(ans)
else:
    r = subset_sum(opt, a)
    print(r)

Submission status: Wrong Answer

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

l = len(str(x))
y = str(x)
head = int(y[0])
tail = x - 100*head

if tail > 5*head:
	print(0)
else :
	print(1)

Submission status: Wrong Answer

Solution code:
def count(S, m, n): 
    table = [0 for k in range(n+1)] 
  
    table[0] = 1
  
    for i in range(0,m): 
        for j in range(S[i],n+1): 
            table[j] += table[j-S[i]] 
  
    return table[n] 
  
def main():
    X = int(input())
    S = [100, 101, 102, 103, 104, 105, 106] 

    if 1 < count(S, 7, X):
        print(1)
    else:
        print(0)
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
X = int(input())
arr = [100, 101, 102, 103, 104, 105, 201, 202, 203, 204, 205, 206, 207, 208, 209, 303, 304, 305, 306, 307, 308, 406, 407, 408, 409, 500, 510, 511, 512, 513, 514, 615]
if (X in arr):
	print('1')
else:
	print('0')

Submission status: Wrong Answer

Solution code:
x=int(input())
items = [100,101,102,103,104]
list = [1]
if x == 100 or x == 101 or x == 102 or x == 103 or x == 104:
    print(1)
elif x <100:
    print(0)
else:
    for i in range(99):
        list.append(0)
    for i in range(5):
        list.append(1)
    for i in range(95):
        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: Wrong Answer

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

m = n%615

for i in range(7):
    for j in range(7):
        for k in range(7):
            for l in range(7):
                for m in range(7):
                    for n in range(7):
                        tmp = 100*i+101*j + 102*k + 103*l * 104*m + 105*n
                        if m == tmp:
                            print('1')
                            sys.exit()
                        elif m < tmp:break

print('0')

Submission status: Wrong Answer

Solution code:
N = int(input())
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: Wrong Answer

Solution code:
import math

def read():
    X = int(input().strip())
    return X,


def solve(X):
    A = [100 ,101, 102, 103, 104, 105]
    NA = 6
    dp = [[False for j in range(X+1)] for i in range(NA+1)]
    if X >= 10500:
        return 1
    for i in range(NA+1):
        dp[i][0] = True
    for i in range(1, NA+1):
        for x in range(0, X+1):
            j = 0
            while x - j * A[i-1] >= 0:
                if dp[i-1][x - j * A[i-1]]:
                    dp[i][x] = True
                    break
                j += 1
    return dp[NA-1][X]
    
if __name__ == '__main__':
    inputs = read()
    output = solve(*inputs)
    print("%d" % output)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

flag = 0

while N > 2100:
  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: Wrong Answer

Solution code:
X = int(input())
c = 0
for i in range(int(X/105)+1):
    rest = X - 105*i
    for j in range(int((rest)/104)+1):
        rest_1 = rest - 104*j
        for k in range(int(rest_1/103) +1):
            rest_2 = rest_1 - 103+k
            for l in range(int(rest_2/102) +1):
                rest_3 = rest_2 - 102*l
                for m in range(int(rest_3/101)+1):
                    rest_4 = rest_3 - 101*m
                    if rest_4 % 100 == 0:
                        c = 1
print(c)

Submission status: Wrong Answer

Solution code:
X=input()
if int(X)>=100:
    print(1 if int(X[0])*5>=int(X[1:3]) or len(X)>=4 else 0)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys

X = int(input())
tmp1 = X // 100
tmp2 = X % 100
ans = 1
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: Wrong Answer

Solution code:
import sys
from decimal import Decimal, ROUND_HALF_UP
import math
input = sys.stdin.readline
#sys.setrecursionlimit(1e9)

def main():
    """code here"""
    x=int(input())
    ans = 0
    if (x/100)<1:
        print("0")
    num = math.floor(x/100)

    x = x %1000
    for i in range(10):
        for j in range(10):
            for k in range(10):
                for l in range(10):
                    for p in range(10):
                        
                        if  (ans -  100*i+101*j+102*k+103*l+104*p) %105==0:
                            print("1")
                            exit()
                            
    
    print("0")



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
n = int(input())

m = n%615

for i in range(7):
    for j in range(7):
        for k in range(7):
            for l in range(7):
                for m in range(7):
                    for n in range(7):
                        tmp = 100*i+101*j + 102*k + 103*l * 104*m + 105*n
                        if m == tmp:
                            print('1')
                        elif m < tmp:break

print('0')

Submission status: Wrong Answer

Solution code:
X=int(input())
max=X/100
N=0
while X/100>N:
    res=X-100*N
    if res>5*N:
        N+=1
        pass
    if res<5*N:
        print('1')
        count=1
        break
    count=0
    N+=1
if count==0:
    print("0")

Submission status: Wrong Answer

Solution code:
import collections
import itertools as it
import math
import numpy as np

# A = input()
# A = int(input())
# A = map(int, input().split())
# A = list(map(int, input().split()))
# A = [int(input()) for i in range(N)]
#
# c = collections.Counter()

X = int(input())
nshina = X // 100
kingaku = X - nshina * 100
# print(kingaku)

is_exist = False
for i0 in range(nshina):
    for i1 in range(nshina - i0):
        for i2 in range(nshina - i0 - i1):
            for i3 in range(nshina - i0 - i1 - i2):
                for i4 in range(nshina - i0 - i1 - i2 - i3):
                    # print(nshina, i0, i1, i2, i3, i4, (nshina - i4 - i3 - i2 - i1 - i0))
                    # print(i1 + i2 * 2 + i3 * 3 + i4 * 4 + (nshina-i4-i3-i2-i1-i0) * 5)
                    if i0 * 100 + i1 * 101 + i2 * 102 + i3 * 103 + i4 * 104 + (nshina-i4-i3-i2-i1-i0) * 105 == X:
                        print(1)
                        exit()

print(0)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
x = int(input())
if len(str(x)) < 3:
  print(0)
elif len(str(x)) == 3:
  mod = int(str(x)[1:])
  n = int(str(x)[:1])
  print("1" if mod <= 5*n else "0")
else:
  mod = int(str(x)[2:])
  n = int(str(x)[:2])
  print("1" if mod <= 5*n else "0")

Submission status: Wrong Answer

Solution code:
X = int(input())

if X % 100 == 0 or X % 101 == 0 or X % 102 == 0 or X % 103 == 0 or X % 104 == 0 or X % 105 == 0:
    print(1)
elif X % 201 == 0 or X % 202 == 0 or X % 203 == 0 or X % 204 == 0 or X % 205 == 0 or X % 206 == 0 or X % 207 == 0 or X % 208 == 0 or X % 209 == 0:
    print(1)
elif X % 303 == 0 or X % 304 == 0 or X % 305 == 0 or X % 306 == 0 or X % 307 == 0 or X % 308 == 0 or X % 309 == 0 or X % 310 == 0 or X % 311 == 0 or X % 312 == 0:
    print(1)
elif X % 406 == 0 or X % 407 == 0 or X % 408 == 0 or X % 409 == 0 or X % 410 == 0 or X % 411 == 0 or X % 412 == 0 or X % 413 == 0 or X % 414 == 0:
    print(1)
elif X % 510 == 0 or X % 511 == 0 or X % 512 == 0 or X % 513 == 0 or X % 514 == 0 or X % 515 == 0:
    print(1)
elif X % 615 == 0:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
for i in range(100,999):
    X=str(i)
    m=int(X[0])
    t=int(X[1:3])
    if m*5>=t or len(X)>=4:
        print("OK",i)
    else:
        print("NO",i)

Submission status: Wrong Answer

Solution code:
def func(X):
  max_X = int(X / 100)+1
  #min_X = int(X / 105)
  #print(min_X)
  #print(max_X)
  for x1 in range(max_X+1):
    for x2 in range(x1,max_X+1):
      for x3 in range(x2,max_X+1):
        for x4 in range(x3,max_X+1):
          for x5 in range(x4,max_X+1):
            for x6 in range(x5,max_X+1):
              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: Wrong Answer

Solution code:
# coding:utf-8
import math
X = int(input())
c = 0
x2 = X%100
for i in range(100000):
  x = 0
  if x2/5 > 1 :
    x = math.floor(x2/5)
    x2 -= 5*x
  elif x2 / 4 >= 1 :
    x = math.floor(x2/4)
    x2 -= 4*x
  elif x2 / 3 >= 1 :
    x = math.floor(x2/3)
    x2 -= 3*x
  elif x2 / 2 >= 1 :
    x = math.floor(x2/2)
    x2 -= 2*x
  elif x2 / 1 == 1 :
    x = math.floor(x2/1)
    x2 -= 1*x
  c += x
  if x2 == 0:
    break
if X > c*100:
  print("1")
else :
  print("0")

Submission status: Wrong Answer

Solution code:
menu_yen = [100, 101, 102, 103, 104, 105]
menu_ten_yen = [1, 2, 3, 4, 5]
amount_of_menu = [100000]*len(menu_yen)

N = int(input())
if N<100:
    print(0)
    exit(0)

s = str(N)
h = int("".join(s[:-2]))
t = int("".join(s[-2:]))

for i in range(101):
    total = i
    if t<total:
        continue
    for j in range(51):
        total+=2
        if t<total:
            continue
        for k in range(34):
            total+=3
            if t<total:
                continue
            for l in range(26):
                total+=4
                if t<total:
                    continue
                for m in range(21):
                    total+=5
                    if t<total:
                        continue
                    if t==total and (i+j+k+l+m)<=h:
                        print(1)
                        exit(0)
print(0)

Submission status: Wrong Answer

Solution code:
import sys
x = int(input())
n = x % 100
maxbuy = x // 100
if maxbuy > 99:
	print(1)
	sys.exit()
if 105* maxbuy < x:
	print(0)
	sys.exit()
for i in range(n//3):
	for j in range(n//3):
		for k in range(n//3):
			for l in range(n//3):
				for m in range(100//3):
					if n == i+2*j+3*k+4*l+5*m and i+j+k+l+m < maxbuy:
						print(1)
						sys.exit()
print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())

A = X//100

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

Submission status: Wrong Answer

Solution code:
x = int(input())

money = {0}

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

while True:
    for i in items:
        p = money.copy()
        for j in p:
            money.add(j)
            money.add(j+i)
    if max(money) > x:
        break

if x in money:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys

X = int(input())
tmp1 = X // 100
tmp2 = X % 100
ans = 1
if tmp1 == 0:
    print(ans)
    sys.exit()

for i in range(5, 1, -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: Wrong Answer

Solution code:
x = int(input())
abl = x // 100
m = x % 100
ans = 0
if x > 9900:
    ans = 1
if x > 99 and round(m / 5 - 0.5) +1 <= abl:
    ans = 1
print(ans)

Submission status: Wrong Answer

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+106*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: Wrong Answer

Solution code:
import sys

X = str(input())
n = len(X)

if n <= 2:
    print("0")
    sys.exit()

keta = int(X[n-2]+X[n-1])

tmp = 0
for i in [5,4,3,2,1]:
    sho = keta/i
    amari = keta%i
    tmp += int(sho)
    if amari == 0:
        break
    keta = amari

wa = ""
for i in reversed(range(n-2)):
    wa += X[i]
wa += "00"
if tmp*100 > int(wa):
    print("0")
else:
    print("1")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
X = int(input())
n = 6

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

ans = 0

for i in range(2**6):
    s = 0
    for j in range(6):
        if (1 & i >> j) == 1:
            s += l[j]

    if s == X:
        ans = 1

print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
l = x // 100
k = l % 20
min = l*100
max = l*100 + k*5
if min <= x <= max:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
# coding:utf-8
import math
X = int(input())
c = 0
x2 = X%100
for i in range(100000):
  x = 0
  if x2/5 > 1 :
    x = math.floor(x2/5)
    x2 -= 5*x
  elif x2 / 4 > 1 :
    x = math.floor(x2/4)
    x2 -= 4*x
  elif x2 / 3 > 1 :
    x = math.floor(x2/3)
    x2 -= 3*x
  elif x2 / 2 > 1 :
    x = math.floor(x2/2)
    x2 -= 2*x
  elif x2 / 1 == 1 :
    x = math.floor(x2/1)
    x2 -= 1*x
  c += x
  if x2 == 0:
    break
if X > c*100:
  print("1")
else :
  print("0")

Submission status: Wrong Answer

Solution code:
def count(S, m, n): 
    table = [0 for k in range(n+1)] 
  
    table[0] = 0
  
    for i in range(0,m): 
        for j in range(S[i],n+1): 
            table[j] += table[j-S[i]] 
  
    return table[n] 
  
def main():
    X = int(input())
    S = [100, 101, 102, 103, 104, 105, 106] 

    if count(S, 7, X):
        print(1)
    else:
        print(0)
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
X = int(input())
able = list()
if X >= 1000:
    print(1)
    exit()
else:
    for i in range(1,10+1):
        for j in range(100*i,105*i+1):
            able.append(j)
            if X in able:
                print(1)
                exit()
print(0)

Submission status: Wrong Answer

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

a = x%100

if math.ceil(a//5) <= x//100:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
c = 0
for i in range(int(X/100)+1):
    rest = X - 100*i
    for j in range(int((rest)/101)+1):
        rest_1 = rest - 101*j
        for k in range(int(rest_1/102) +1):
            rest_2 = rest_1 - 102+k
            for l in range(int(rest_2/103) +1):
                rest_3 = rest_2 - 103*l
                for m in range(int(rest_3/104)+1):
                    rest_4 = rest_3 - 104*m
                    if rest_4 % 105 == 0:
                        c = 1
print(c)

Submission status: Wrong Answer

Solution code:
import sys

X = int(input())
tmp1 = X // 100
tmp2 = X % 100
ans = 1
if tmp1 == 0:
    print(ans)
    sys.exit()

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

if t2 != 0:
    ans = 0

print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
abl = x // 100
m = x % 100
ans = 0
if x > 99 and round(m / 5 - 0.5) +1 <= abl:
    ans = 1
print(ans)

Submission status: Wrong Answer

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):
          total = 1*i + 2*j + 3*k + 4*l + 5*m
          if total == X:
            print(1)
            exit()
            
print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())

a = x // 100
n = x % 100

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

Submission status: Wrong Answer

Solution code:
import sys

X = int(input())
tmp1 = X // 100
tmp2 = X % 100
ans = 1
if tmp1 == 0:
    print(ans)
    sys.exit()

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

if t2 != 0:
    ans = 0

print(ans)

Submission status: Wrong Answer

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
if over>=d5+d4+d3+d2:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
import math

x = int(input())

n = x // 105
if x % 105 >= 5*n:
  print('1')
else:
  print('0')

Submission status: Wrong Answer

Solution code:
import sys
import itertools

input = sys.stdin.readline
X = int(input())
#a = [int(i) for i in input().split()] 
#e = [[int(i) for i in input().split()] for i in range(n)] 

maxtimes = int(X/100)+2
price = 0
for i1 in range(0, maxtimes):
    if i1*100 > X:
        break
    for i2 in range(0, maxtimes):
        if i1*100+i2*101 > X:
            break
        for i3 in range(0, maxtimes):
            if i1*100+i2*101+i3*102 > X:
                break
            for i4 in range(0, maxtimes):
                if i1*100+i2*101+i3*102+i4*103 > X:
                    break
                for i5 in range(0, maxtimes):
                    if i1*100+i2*101+i3*102+i4*103+i5+104 > X:
                        break
                    for i6 in range(0, maxtimes):
                        price = i1*100+i2*101+i3*102+i4*103+i5*104+i6*105
                        #print(i1, i2, i3, i4, i5, i6)
                        if price == X:
                            print(1)
                            exit()
                        elif price > X:
                            break

print(0)

Submission status: Wrong Answer

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


def solve(X: int):
    dp = [[False]*(X+1) for _ in range(7)]
    price = [100,101,102,103,104,105]

    for i in range(7):
        dp[i][0] = True

    ## i番目まででjを払えるか
    for i in range(6):
        for j in range(X+1):
            if j >= price[i]:
                dp[i+1][j] = dp[i][j] or dp[i][j-price[i]]
            else:
                dp[i+1][j] = dp[i][j]

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

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())

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

n = int(x/100)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
x = int(input())
n = x % 100
maxbuy = x // 100
if maxbuy > 99:
	print(1)
	sys.exit()
if 105* maxbuy < x:
	print(0)
	sys.exit()
for i in range(n//3):
	for j in range(n//3):
		for k in range(n//3):
			for l in range(n//3):
				for m in range(n//3):
					if n == i+2*j+3*k+4*l+5*m:
						print(1)
						sys.exit()
print(0)

Submission status: Wrong Answer

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

if 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: Wrong Answer

Solution code:
n = int(input())

digit = len(str(n))
min = 10**(digit-1)
max = min * 1.05

# 桁数の1倍~1.05倍の間に含まれる
if n >= min and n <= max:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
def func(X):
  max_X = int(X / 100)
  #min_X = int(X / 105)
  #print(min_X)
  #print(max_X)
  for x1 in range(max_X+1):
    for x2 in range(x1,max_X+1):
      for x3 in range(x2,max_X+1):
        for x4 in range(x3,max_X+1):
          for x5 in range(x4,max_X+1):
            for x6 in range(x5,max_X+1):
              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: Wrong Answer

Solution code:
n = int(input())
for i in range(1, 1000000):
	if i * 615 == n:
		c = i
		break
try:
	if c > 0:
		print('1')
except:
	print('0')

Submission status: Wrong Answer

Solution code:
x = int(input())
abl = x // 100
m = x % 100
ans = 0
if x > 99 and round(m / 5 + 0.5) <= abl:
    ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())
for i1 in range(1000):
    for i2 in range(1000):
        for i3 in range(1000):
            for i4 in range(1000):
                for i5 in range(1000):
                    ans = i1*100+i2*120+i3*130+i4*140+i5*i5
                    if ans == 0:
                        continue
                    if X%ans == 0:
                        print(1)
                        exit()
print(0)

Submission status: Wrong Answer

Solution code:
# coding:utf-8
import math
X = int(input())
c = 0
five = 0
four = 0
three = 0
two = 0
one  = 0
x2 = X%100
for i in range(100000):
  x = 0
  if x2/5 > 1 :
    x = math.floor(x2/5)
    five = 5*x
    x2 -= five
  elif x2 % 4 > 1 :
    x = math.floor(x2/4)
    four = 4*x
    x2 -= four    
  elif x2 % 3 > 1 :
    x = math.floor(x2/3)
    three = 3*x
    x2 -= three
  elif x2 % 2 > 1 :
    x = math.floor(x2/2)
    two = 2*x
    x2 -= two
  elif x2 % 1 == 0 :
    x = math.floor(x2/1)
    one = 1*x
    x2 -= one
  c += x
  if x2 == 0:
    break

if X > c*100+five+four+three+two+one:
  print("1")
else :
  print("0")

Submission status: Wrong Answer

Solution code:
import sys
x=(input())
if int(x) < 100:
    print(0)
else:
    n=int(x[:-2])
    t=int(x[-2]+x[-1])
    if n > 10:
        n = 10
    ans = 0
    p = 0
    for i in range(0,n):#0
        for j in range(0,n):#1
            for k in range(0,n):#2
                for l in range(0,n):#3
                    for m in range(0,n):#4
                        for o in range(0,n):#5
                            ans = i*0+j*1+k*2+l*3+m*4+o*5
                            
                            if ans == t:
                                print(1)
                                sys.exit()

    print(0)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=6
a=[100,101,102,103,104,105]
k=int(input())

def f(i,s):
    if i == n:
        return s == k
    if f(i+1,s):
        return True
    if f(i+1,s+a[i]):
        return True
    return False
if f(0,0):
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
inf = float("inf")
x = int(input())
a = x // 100 * 5 > x - x // 100 * 100
print(int(a))

Submission status: Wrong Answer

Solution code:
from math import ceil
N = int(input())
if N < 100:
    print(1)
    exit()
t, s = str(N)[:-2], str(N)[-2:]
# print(t, s)
if int(t) >= ceil(int(s)/5):
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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 num > 105:
        return False
    if sum_x == X_MOD:
        return True
    if cnt_x == X_DIV:
        return False
    
    return dfs(sum_x+num, cnt_x+1, num) or dfs(sum_x+num+1, cnt_x+1, num+1)
    

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
for i1 in range(10):
    for i2 in range(10):
        for i3 in range(10):
            for i4 in range(10):
                for i5 in range(10):
                    ans = i1*100+i2*120+i3*130+i4*140+i5*i5
                    if ans == 0:
                        continue
                    if X%ans == 0:
                        print(1)
                        exit()
print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

if x >= 2200:
    print(1)
else:
    found = False
    for i0 in range(x // 100):
        if found:
            break
        for i1 in range(x // 100):
            if found:
                break
            for i2 in range(x // 100):
                if found:
                    break
                for i3 in range(x // 100):
                    if found:
                        break
                    for i4 in range(x // 100):
                        if (x - (i0 * 100 + i1 * 101 + i2 * 102 + i3 * 103 + i4 * 104)) % 105 == 0:
                            print(1)
                            found = True
                            break
    if not found:
        print(0)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env pytho3
import math
s = int(input())

if s < 2000:
    d = s//100
    if s - d*105 > 0:print(0)
    else:print(1)
else: print(0)

Submission status: Wrong Answer

Solution code:
import math

X = int(input())

if(X < 100):
    print(0)
    exit
else:
    if math.floor((int(str(X)[-2])*10 + int(str(X)[-1])*1) / 5) + 1 > math.floor(X / 100):
        print(0)
    else:
        print(1)

Submission status: Wrong Answer

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

# Input
x = int(input())

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

# Output
print(ans)