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:
x=int(input())
n=int(x/100)
y=x-100*n
a=0
for a in range(n+1):
    for b in range(n+1-a):
        for c in range(n+1-a-b):
            for d in range(n+1-a-b-c):
                for e in range(n+1-a-b-c-d):
                    if 5*a+4*b+3*c+2*d+e==y:
                        print(1)
                        a+=1
                        break
                break
            break
        break

if a==0:
    print(0)

Submission status: Wrong Answer

Solution code:
N=int(input())
i=N%100
min=100*i
max=105*i
if min<=N<=max:
    print('1')
else:
    print('0')

Submission status: Wrong Answer

Solution code:
N=int(input())
d,m=divmod(N,100)
print(['1','0'][m<=(d*5)])

Submission status: Wrong Answer

Solution code:
N=int(input())
m=N%100
print(['1','0'][m<=5])

Submission status: Wrong Answer

Solution code:
N=int(input())
d,m=divmod(N,100)
print(['1','0'][m < d*5])

Submission status: Wrong Answer

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

if dp[X] == True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
for i in range(N+1):
    if int(i * 1.08) == N:
        break
if i == N:
    print(":(")
else:
    print(i)

Submission status: Wrong Answer

Solution code:
n=int(input())
if(n>=2000):
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
n=int(input())
if(n>2000):
  print("1")
else:
  print("0")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())

A1 = X % 100
count = 0
while A1 >= 5:
    count += 1
    A1 -= 5
while A1 >= 4:
    count += 1
    A1 -= 4
while A1 >= 3:
    count += 1
    A1 -= 3
while A1 >= 2:
    count += 1
    A1 -= 2
while A1 >= 1:
    count += 1
    A1 -= 1
if count < X // 100:
    print('1')
else:
    print('0')

Submission status: Wrong Answer

Solution code:
X = int(input())

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

def dfs(i, rem):
    if i >= 5:
        return rem > 0
    else:
        flag = False
        for j in range(1, rem // price[i]):
            if dfs(i + 1, rem - j * price[i]):
                flag = True
                break
        return flag


print(1 if dfs(0, X) else 0)

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
if n<100:
  print(0)
  sys.exit()

a = n%100
if a==0:
  print(1)
  sys.exit()
b = n//100
if 5*b<a:
  print(0)
  sys.exit()
for i in range(b):
  for j in range(b-i):
    for k in range(b-i-j):
      for l in range(b-i-j-k):
        for m in range(b-i-j-k-l):
          if i+2*j+3*k+4*l+5*m==a:
            print(1)
            sys.exit()
print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())

j = x%100
print(j)
k = x//100
print(k)

if x>=2000:
  print('1')
elif x<100:
  print('0')
else:
  j = x%100
  k = x//100
  if k*5 >= j:
    print('1')
  else:
    print('0')

Submission status: Wrong Answer

Solution code:
x = int(input())

if x>=2000:
  print('1')
elif x<=105:
  print('0')
else:
  j = x%100
  k = x//100
  if k*5 >= j:
    print('1')
  else:
    print('0')

Submission status: Wrong Answer

Solution code:
x = int(input())

if x>=2100:
  print('1')
elif x<106:
  print('0')
elif 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%101==100 or x%102==100 or x%102==101 or x%103==100 or x%103==101 or x%103==102 or x%103==0:
  print('1')
elif x%104==100 or x%104==101 or x%104==102 or x%104==103 or x%105==100 or x%105==101 or x%105==102 or x%105==103 or x%105==104:
  print('1')
else:
  j = x%105
  k = x//105
  if k*5 >= 100-j:
    print('1')
  else:
    print('0')

Submission status: Wrong Answer

Solution code:
x = int(input())

if x>=2050:
  print('1')
elif x<106:
  print('0')
elif 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%101==100 or x%102==100 or x%102==101 or x%103==100 or x%103==101 or x%103==102 or x%103==0:
  print('1')
elif x%104==100 or x%104==101 or x%104==102 or x%104==103 or x%105==100 or x%105==101 or x%105==102 or x%105==103 or x%105==104:
  print('1')
else:
  j = x%105
  k = x//105
  if k*5 >= 100-j:
    print('1')
  else:
    print('0')

Submission status: Wrong Answer

Solution code:
import sys

x = input()

if len(x) < 3:
    sys.exit()

prefix = int(x[:-2])
suffix = int(x[-2:])

n = 0
for item in range(5, 0, -1):
    n += suffix // item
    suffix %= item

print(0 if n>prefix else 1)

Submission status: Wrong Answer

Solution code:
import numpy as np
X = int(input())

J = np.zeros(X+1, dtype="bool")
# J[i] は、 i円の買い物ができるときにTrue, できないとFalse
J[0] = True
J[1:100] = False
J[100:106] = True
for i in range(106, X+1):
    if J[i - 100] or J[i - 101] or J[i - 102] or J[i - 103] or J[i - 104] or J[i - 105]:
        J[i] = True
    else:
        J[i] = False

if J[X] == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x = input()

n = x/100
dp = [1]*(x+1)

for i in range(n+1):
    if i <= 99:
        dp[i] = 0
    elif i in range(100,106):
        dp[i] = 1
    elif 1 in dp[i-105:i-99]:
        dp[i] = 1
    else:
        dp[i] = 0

print dp[x]

Submission status: Wrong Answer

Solution code:
x = input()

n = x/100
dp = [1]*(x+1)

for i in range(n+1):
    if i <= 99:
        dp[i] = 0
    elif i in range(100,106):
        dp[i] = 1
    elif 1 in dp[i-100:i-106]:
        dp[i] = 1
    else:
        dp[i] = 0

print dp[x]

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())

num = x // 100



dp = ["?"] * (x+1)
dp[0] = "Yes"

for i in range(1,x+1):
    if i <= 99:
        dp[i] = "No"
    elif i in (100,101,102,103,104,105):
        dp[i] = "Yes"
    else:
        if "Yes" in(dp[i-100],dp[i-101],dp[i-102],dp[i-103],dp[i-104],dp[i-105]):
            dp[i] = "Yes"
        else:
            dp[i] = "No"

            
print(dp[x])

Submission status: Wrong Answer

Solution code:
X = int(input())  # sum
MAX_NUM = 1000

ans = 0

quo_A = int(X / 105)
for cnt_A in range(0, min(quo_A, MAX_NUM) + 1):
    # print("cnt_A: " + str(cnt_A))

    quo_B = int((X - cnt_A * 105) / 104)
    for cnt_B in range(0, min(quo_B, MAX_NUM) + 1):
        # print("cnt_B: " + str(cnt_B))

        quo_C = int((X - cnt_A * 105 - cnt_B * 104) / 103)
        for cnt_C in range(0, min(quo_C, MAX_NUM) + 1):
            # print("cnt_C: " + str(cnt_C))

            quo_D = int((X - cnt_A * 105 - cnt_B * 104 - cnt_C * 103) / 102)
            for cnt_D in range(0, min(quo_D, MAX_NUM) + 1):
                # print("cnt_C: " + str(cnt_C))

                quo_E = int((X - cnt_A * 105 - cnt_B * 104 - cnt_C * 103 - cnt_D * 102) / 101)
                for cnt_E in range(0, min(quo_E, MAX_NUM) + 1):

                    quo_F = int((X - cnt_A * 105 - cnt_B * 104 - cnt_C * 103 - cnt_D * 102 - cnt_E * 101) / 100)
                    for cnt_F in range(0, min(quo_F, MAX_NUM) + 1):
                        if cnt_A * 105 + cnt_B * 104 + cnt_C * 103 + cnt_D * 102 + cnt_E * 101 + cnt_F == X:
                            # print([cnt_A, cnt_B, cnt_C, cnt_D, cnt_E, cnt_F])
                            ans = 1

print(ans)

Submission status: Wrong Answer

Solution code:
import math
 
x = int(input())
if x < 100:
  print(0)
else: 
  a = math.ceil(x / 100) 
  b = x - a * 100

  if b <= a * 5:
    print(1)
  else:
    prtnt(0)

Submission status: Wrong Answer

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

a = math.ceil(x / 100) 
b = x - a * 100

if b <= a * 5:
  print(1)
else:
  prtnt(0)

Submission status: Wrong Answer

Solution code:
X = int(input())

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

a = X // 105
b = a * 105 + 1
c = str(a) + '9' * 2
c = int(c)

if b <= X <= c:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
X = int(input())

amari = X % 105

if 0 <= X <= 99 or 106 <= X <= 199 or 211 <= X <= 299 or 421 <= X <= 499 or 526 <= X <= 599 or 631 <= X <= 699 or 736 <= X <= 799 or 841 <= X <= 899: #946 <= X <= 999 or 1051 <= X <= 1099 or 1156 <= X <= 1199:
    print(0)
elif X >= 946:
    if 1 <= amari <= 44:
        print(0)
    else:
        print(1)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
X = int(input())

if 0 <= X <= 99 or 106 <= X <= 199 or 211 <= X <= 299 or 421 <= X <= 499 or 526 <= X <= 599 or 631 <= X <= 699 or 736 <= X <= 799 or 841 <= X <= 899 or 946 <= X <= 999 or 1051 <= X <= 1099:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
X = int(input())

if 0 <= X <= 99 or 106 <= X <= 199 or 211 <= X <= 299 or 421 <= X <= 499 or 526 <= X <= 599 or 631 <= X <= 699 or 736 <= X <= 799 or 841 <= X <= 899 or 946 <= X <= 999 or 1051 <= X <= 1149:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
X = int(input())

if X >= 1000:
    print(1)
elif 0 <= X <= 99 or 106 <= X <= 199 or 211 <= X <= 299 or 421 <= X <= 499 or 526 <= X <= 599 or 631 <= X <= 699 or 736 <= X <= 799 or 841 <= X <= 899 or 946 <= X <= 999:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
X = int(input())

if X >= 1000:
    print(1)
elif 0 <= X <= 99 or 106 <= X <= 199 or 207 <= X <= 299 or 946 <= X <= 999:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
X = int(input())

if X >= 1000:
    print(1)
elif 0 <= X <= 99 or 106 <= X <= 199 or 207 <= X <= 299 or 946 <= X <= 999:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())

if X >= 1000:
    print(1)
elif 0 <= X <= 99 or 106 <= X <= 199 or 207 <= X <= 299:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=int(input())
x1,x2=int(x//100),x%100
for a in range(x1):
  for b in range(x1-a):
    for c in range(x1-a-b):
      for d in range(x1-a-b-c):
        for e in range(x1-a-b-c-d):
          if x2==(a+2*b+3*c+4*d+5*e)%100:
            if x-100*(a-b-c-d-e)-(a+2*b+3*c+4*d+5*e)//100>=0:
              print(1)
              exit()
            else:
              print(0)
              exit()

Submission status: Wrong Answer

Solution code:
x=int(input())
x1,x2=int(x//100),x%100
for a in range(x1):
  for b in range(x1-a):
    for c in range(x1-a-b):
      for d in range(x1-a-b-c):
        for e in range(x1-a-b-c-d):
          if x2==(a+2*b+3*c+4*d+5*e)%100:
            if x-100*(a-b-c-d-e)>=0:
              print(1)
              exit()
            else:
              print(0)
              exit()

Submission status: Wrong Answer

Solution code:
x=int(input())
x1,x2=int(x//100),x%100
for a in range(x1):
  for b in range(x1-a):
    for c in range(x1-a-b):
      for d in range(x1-a-b-c):
        for e in range(x1-a-b-c-d):
          if x2==(a+2*b+3*c+4*d+5*e)%100:
            if x-a-b-c-d-e>=0:
              print(1)
              exit()
            else:
              print(0)
              exit()

Submission status: Wrong Answer

Solution code:
import numpy as np

x = int(input())

num_of_product = x // 100
amari = x % 100


pattern_list = np.array([0 for i in range(num_of_product)])

for i in range(len(pattern_list)):
	for j in range(6):
		pattern_list[i] += j
		if(np.sum(pattern_list)) == amari:
			print("1")
			exit()

print("0")

Submission status: Wrong Answer

Solution code:
x = int(input())
n = x//100
d = x-n*100
if d==0:
  print(1)
  exit()

if d//5 <n:
  print(1)
  exit()

print(0)

Submission status: Wrong Answer

Solution code:
import itertools

X = int(input())

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

combinationCosts = []

a = itertools.combinations(stock, 2)
b = itertools.combinations(stock, 3)
c = itertools.combinations(stock, 4)
d = itertools.combinations(stock, 5)
e = itertools.combinations(stock, 6)

for i in e:
    cost = 0
    for ii in i:
        cost += ii
    combinationCosts.append(cost)

for i in d:
    cost = 0
    for ii in i:
        cost += ii
    combinationCosts.append(cost)

for i in c:
    cost = 0
    for ii in i:
        cost += ii
    combinationCosts.append(cost)

for i in b:
    cost = 0
    for ii in i:
        cost += ii
    combinationCosts.append(cost)

for i in a:
    cost = 0
    for ii in i:
        cost += ii
    combinationCosts.append(cost)

result = False

for i in combinationCosts:
    if X % i == 0:
        result = True
        break

if result == False:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
X = int(input())
a = int(str(X)[-2:])

items = [5, 4, 3, 2, 1]

n = 0
for item in items:
    n += a // item
    if a % item == 0:
        if n * 100 + a <= X:
            print('1')
        else:
            print('0')

Submission status: Wrong Answer

Solution code:
X = int(input())
if X < 100:
    print(0)
else:
    s = str(X)
    n = int(s[0])
    x = int(s[1:])
    print(0 if x > 5*n or X < 100 else 1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
n = int(X//100)
x = int(X%100)
cnt = int(0)
for a in range(n):
    for b in range(n):
        for c in range(n):
            for d in range(n):
                for e in range(n):
                    for f in range(n):
                        if (5*a + 4*b + 3*c + 2*d + 1*e + 0*f) == x and (a+b+c+d+e+f) == n:
                            cnt += 1
if x == 0:
    print(1)
elif cnt != 0:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
n = int(X//100)
x = int(X%100)
cnt = int(0)
for a in range(n):
    for b in range(n):
        for c in range(n):
            for d in range(n):
                for e in range(n):
                    for f in range(n):
                        if (5*a + 4*b + 3*c + 2*d + 1*e + 0*f) == x and (a+b+c+d+e+f) == n:
                            #print(a,b,c,d,e,f)
                            cnt += 1
if x == 0:
    print(1)
elif cnt != 0:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
n = int(X//100)
x = int(X%100)
cnt = int(0)
for a in range(n):
    for b in range(n):
        for c in range(n):
            for d in range(n):
                for e in range(n):
                    if (1*a + 2*b + 3*c + 4*d + 5*e) == x and (a+b+c+d+e) == n:
                        cnt += 1
if cnt != 0:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

if x >= 2000:
    print(1)
else:
    flag = False
    n = x // 100
    for a in range(n):
        for b in range(n - a):
            for c in range(n - b):
                for d in range(n - c):
                    for e in range(n - d):
                        for f in range(n - e):
                            if x == a * 100 + b * 101 + c * 102 + d * 103 + e * 104 + f * 105:
                                flag = True
                                break
                        if flag:
                            break
                    if flag:
                        break
                if flag:
                    break
            if flag:
                break
        if flag:
            break

    print(1) if flag else print(0)

Submission status: Wrong Answer

Solution code:
import math

X = int(input())

i = 0
j = 0
while i < 1:
  q = (X - (100 * j)) // 100
  r = (X - (100 * j)) % 100 + (100 * j)
  
  if math.ceil(r // 5) <= q:
    print(1)
    break
    
  if (X - (100 * j)) <= 0:
    print(0)
    break
  
  j += 1

Submission status: Wrong Answer

Solution code:
import math

X = int(input())

i = 0
j = 0
while i < 1:
  q = (X - (100 * j)) // 100
  r = (X - (100 * j)) % 100
  
  if math.ceil(r // 5) <= q:
    print(1)
    break
    
  if (X - (100 * j)) <= 0:
    print(0)
    break
  
  j += 1

Submission status: Wrong Answer

Solution code:
x=int(input())
if x<100:
	print(0)
elif x>100:
	a=int(str(x)[-2:])
	b=int(str(x)[:-2])
	counter=0
	while a>=5:
		a-=5
		counter+=1
	while a>=4:
		a-=4
		counter+=1
	while a>=3:
		a-=3
		counter+=1
	while a>=2:
		a-=2
		counter+=1
	while a>=1:
		a-=1
		counter+=1
	print(1 if counter<=b else 0)

Submission status: Wrong Answer

Solution code:
x = int(input())
cmax = x//100
for i in range(cmax):
  a = i*100
  b = i*105
  if a <= x <= b:
    print(1)
    exit()
    
print(0)

Submission status: Wrong Answer

Solution code:
number=int(input())
div100=int(number//100)
get100=div100*100
diff100=number-get100
div5=int(diff100//5)
mod5=diff100%5
if div5*100<number and number>=100:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
X = int(input())

simo = X%100
uwa = (X - simo) // 100

syou = (simo // 5)

if uwa >= syou:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

dp = [0]*(x+106)
dp[0] = 1
for i in range(x+1):
    if(dp[i]):
        for tmp in [100, 101, 102, 103, 104, 105]:
            dp[i+tmp] = 1
print(dp[x+1])

Submission status: Wrong Answer

Solution code:
X = int(input())

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

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

print(dp[X])

Submission status: Wrong Answer

Solution code:
x = int(input())
c = x // 100
if 100*c <= x and x <= 105*c:
    print(105*c)
    exit(0)
print(0)

Submission status: Wrong Answer

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

X = int(input())

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

list_X = list(str(X))

one_X = list_X[-1]
ten_X = list_X[-2]

nessesary_money = 105 * 2 * int(ten_X)
if int(one_X) <= 5:
    nessesary_money += 100 + int(one_X)
else:
    nessesary_money += 200 + int(one_X)

if nessesary_money <= X:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

X = int(input())

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

list_X = list(str(X))

one_X = list_X[-1]
print(one_X)
ten_X = list_X[-2]
print(ten_X)

nessesary_money = 105 * 2 * int(ten_X)
if int(one_X) <= 5:
    nessesary_money += 100 + int(one_X)
else:
    nessesary_money += 200 + int(one_X)

if nessesary_money <= X:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

X = int(input())

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

list_X = list(str(X))

one_X = list_X[-1]
ten_X = list_X[-2]

nessesary_money = 105 * 2 * int(ten_X)
if int(one_X) < 5:
    nessesary_money += 100 + int(one_X)
else:
    nessesary_money += 200 + int(one_X)

if nessesary_money <= X:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
x=input()

if len(x)>=3:
  c=int(x[-2:])
  x=int(x)
  if c==0:
    ans=1
  elif c%5==0:
     ans=1 if x-105*(c//5)>=100 else 0
  elif c%4==0:
    ans=1 if x-104*(c//4)>=100 else 0
  elif c%3==0:
    ans=1 if x-103*(c//3)>=100 else 0
  elif c%2==0:
    ans=1 if x-102*(c//2)>=100 else 0
  elif c%1==0:
    ans=1 if x-101*(c//1)>=100 else 0
  else:
    ans=0
else:
  ans=0
print(ans)

Submission status: Wrong Answer

Solution code:
x=input()

if len(x)>=3:
  c=int(x[-2:])
  x=int(x)
  if c%5==0:
     ans=1 if x-105*(c//5)>=100 else 0
  elif c%4==0:
    ans=1 if x-104*(c//4)>=100 else 0
  elif c%3==0:
    ans=1 if x-103*(c//3)>=100 else 0
  elif c%2==0:
    ans=1 if x-102*(c//2)>=100 else 0
  elif c%1==0:
    ans=1 if x-101*(c//1)>=100 else 0
  else:
    ans=0
else:
  ans=0
print(ans)

Submission status: Wrong Answer

Solution code:
x=input()

c=int(x[-2:])
x=int(x)
if c%5==0:
   ans=1 if x-105*(c//5)>=100 else 0
elif c%4==0:
  ans=1 if x-104*(c//4)>=100 else 0
elif c%3==0:
  ans=1 if x-103*(c//3)>=100 else 0
elif c%2==0:
  ans=1 if x-102*(c//2)>=100 else 0
elif c%1==0:
  ans=1 if x-101*(c//1)>=100 else 0
else:
  ans=0
print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())


def check_exist(X):
    for i in range(1, X + 1):
        start_point = i * 100
        end_point = i * 105
        for j in range(start_point, end_point):
            if X == j:
                return True


if check_exist(X):
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
def solve():
	X = int(input())
	rest = X % 100
	rest %= 10
	for first_digit in range(0, 6):
		if first_digit == rest:
			print(1)
			exit()
	print(0)
solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
if n%(100+101+102+103+104+105)==0:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
m = X % 100

S = 0
for i in range(1, 6)[:: -1]:
    S += (100 + i) * (m // i)
    m -= m // i

if S > X:
    print('0')
else:
    print('1')

Submission status: Wrong Answer

Solution code:
X = int(input())
m = X % 100

S = 0
for i in range(1, 6)[:: -1]:
    S += (100 + i) * (m % i)
    m -= m % i

if S > X:
    print('0')
else:
    print('1')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
item = (('おにぎり', 100),
        ('サンドイッチ', 101), 
        ('クッキー', 102), 
        ('ケーキ', 103), 
        ('飴', 104), 
        ('パソコン', 105))
ans = 0

price = []

for i in range(2**6):
    bag = []
    total = 0
    for j in range(6):
        if ((i >> j) & 1):
            bag.append(item[j][0])
            total += item[j][1]
    if X == total:
        ans = 1
    price.append(total)

price = list(set(price))
price.sort()

for i in range(1, len(price)):
    if X % price[i] == 0:
        ans = 1

print(ans)

Submission status: Wrong Answer

Solution code:
from itertools import combinations_with_replacement as comb

def f(n, h):
    for i in comb(range(1, 6), n):
        if sum(i) == h:
            return 1
    return 0

if __name__ == '__main__':
    x = int(input())
    n = x // 100
    h = x - 100 * n
    print(f(n, h))

Submission status: Wrong Answer

Solution code:
x = int(input())
dp = [0 for i in range(x+1)]
dp[0] = 1
for i in range(len(dp)):
    if dp[i] == 1:
        for j in range(5):
            if i + j + 100 <= x:
                dp[i+j + 100] = 1
print(dp[-1])

Submission status: Wrong Answer

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

import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    x = int(input())
    dp = [False] * (100000 + 1)
    dp[0] = True

    for p in [100,101,102,103,104,105]:
        for i in range(100000):
            if p <= i:
                dp[i] |= dp[i-p]

    print(1 if dp[x] else 0)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8

X = int(input())
q = X//100
mod = X%100

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

Submission status: Wrong Answer

Solution code:
A = 13686784449508840134535141032768775559720151357411287890658150001560459561020153045905603435404123030200610562432254201427071052237294447412334049909610097560356123011339726961041294276995998978681928162865195994813010196847182141514372891432895266200835012616119057918511600926094935589261029156595432300180276957054843952600637987375789295618125775584040424260405298047333745181016738145357022272987071440607502135421833617185794856938596929955612758657322356202211572781885965905950274302497904276173920267296140155384562533798666020431711631818479842160768230849308321711828609914806776889345
N = int(input())
print(1 if N >= 2000 else A>>N & 1)

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
def main():
    x = int(sys.stdin.readline().rstrip())
    
    if x < 100:
        print(0)
        sys.exit()
    if 100 <= x <= 105:
        print(1)
        sys.exit()

    dp = np.zeros_like(np.arange(x+1), dtype=bool)
    dp[100:106] = True
    for i in range(105, x):
        dp[i+1] =  np.any(dp[i+1-105:i+1-100])

    print(dp[x] & 1)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())

cnt = 0
for i in range(200):
  if 100*i <= x <= 105*i:
    print(1)
    cnt = 1
    break
if cnt == 0:
  print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
c = math.floor(x / 105)
if 100*c <= x <= 105*c:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n % 100 <= 15 :
  print(1)
else :
  print(0)

Submission status: Wrong Answer

Solution code:
n = int(input().strip())
valid = { 0: True }
for i in range(1, n+1):
  valid[i] = any(valid.get(i-j, False) for j in range(100, 106))
print (valid[n])

Submission status: Wrong Answer

Solution code:
num = int(input())

item_number = num//100
temp_val = num%100
times = temp_val //5 +1

# print(item_number)
# print(times)

if item_number >=times:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
num = int(input())

item_number = num//100
temp_val = num%100
times = temp_val //5

# print(item_number)
# print(times)

if item_number >=times:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import itertools as it

num = int(input())

item_number = num//100
temp_val = num%100

times = temp_val //5
temp_val = temp_val % 5

need_item_number = times + temp_val

# print(item_number)
# print(times)
# print(need_item_number)

if item_number >= need_item_number:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
X = int(input())

def calc(X):

    Y = X % 100
    N = X // 100

    n_fmax = Y//5

    for f in range(n_fmax+1):

        y_e = Y - 5 *f
        n_emax = min(N - f, y_e//4)
        for e in range(n_emax + 1):
            y_d = y_e - 4 * e
            n_dmax = min(n_emax - e, y_d//3)

            for d in range(n_dmax + 1):
                y_c = y_d - 3 * d
                n_cmax = min(n_dmax - d, y_c//2)

                for c in range(n_cmax + 1):
                    y_b = y_c - 2 * c
                    n_bmax = min(n_cmax - c, y_b//1)

                    for b in range(n_bmax + 1):
                        y_a = y_b - b

                        if y_a == 0:
                            return(1)

    return(0)

print(calc(X))

Submission status: Wrong Answer

Solution code:
import itertools as it

num = int(input())

item_number = num//100
temp_val = num%100

times = temp_val //15
temp_val = temp_val % 15

if temp_val <= 5:
    temp_val = 1
elif temp_val <= 10:
    temp_val = 2
else:
    temp_val =3

need_item_number = 3*times + temp_val

print(item_number)
print(times)
print(need_item_number)

if item_number >= need_item_number:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import itertools as it

num = int(input())

item_number = num//100
temp_val = num%100

times = temp_val //15
temp_val = temp_val % 15

if temp_val <= 4:
    temp_val = 1
elif temp_val <= 10:
    temp_val = 2
else:
    temp_val =3

need_item_number = 3*times + temp_val

# print(item_number)
# print(times)
# print(need_item_number)

if item_number >= need_item_number:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import itertools as it

num = int(input())

item_number = num//100

if item_number>= 20:
    item_number = 20

res_list = []
candi_list = list(it.combinations_with_replacement([100, 101, 102, 103, 104, 105], item_number))
candi_ans_list = [sum(item) for item in candi_list]

if num in candi_ans_list:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=int(input())
import math
print(int(math.ceil(s%100)//5*100<=s))

Submission status: Wrong Answer

Solution code:
s=int(input())
import math
print(int(math.ceil(s%100+1)//5*100<=s))

Submission status: Wrong Answer

Solution code:
X = int(input())

X_mod = X%100
X_count = X//100

count = 0
for i in reversed(range(2,6)):
  count += X_mod//i
  X_mod = X_mod%i

ans = 0
if count <= X_count:
  ans = 1
else:
  ans = 0

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

out = 1

for i in range(1,20):
  if n >= i*105+1 and n <= (i+1)*100-1:
    out = 0

print(out)

Submission status: Wrong Answer

Solution code:
n = int(input())

106-199
211-299
316-399

out = 1

for i in range(1,21):
  if n >= i*105+1 and n <= (i+1)*100-1:
    out = 0


print(out)

Submission status: Wrong Answer

Solution code:
n = int(input())

106-199
211-299
316-399

out = 1

for i in range(1,21):
  if n > i*105 and n < (i+1)*100:
    out = 0

print(out)

Submission status: Wrong Answer

Solution code:
n=int(input());print(+(n%100*21<n))

Submission status: Wrong Answer

Solution code:
n=int(input());print(+(n/100*5>=n%100))

Submission status: Wrong Answer

Solution code:
n=int(input());print(+(n//100*6>n%100))