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())
ans = 0
p = x%615
if x>=615:
   for a in range(0,6):
        for b in range(0,6):
            for c in range(0,6):
                for d in range(0,6):
                    for e in range(0,6):
                        if p==100*a + 101*b + 102*c + 104*d + 105*e:
                            ans = 1
                            break
else:
    for a in range(0,6):
        for b in range(0,6):
            for c in range(0,6):
                for d in range(0,6):
                    for e in range(0,6):
                        if x==100*a + 101*b + 102*c + 104*d + 105*e:
                            ans = 1
                            break
    print(ans)

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())
r = 0
checkBoth = False
if a <=  735:
  opt = [100, 101, 102, 103, 104, 105]
  r = subset_sum(opt, a)
  print(r)
else:
  #a = a/2
  if a %2==0:
    a /=2
  else:
    checkBoth = True
    a = (a-1)/2
  opt = [100, 101, 102, 103, 104, 105] * 3
  
  for i in opt:
    if a % i ==0:
      r =1
      break
    if r != 1:
        if checkBoth:
            r1 = subset_sum(opt, a)
            r2 = subset_sum(opt, a + 1)
            if r1 == 1 and r2 == 1:
                r = 1
        else:
            r = subset_sum(opt, a)
  print(r)

Submission status: Wrong Answer

Solution code:
import sys

X = int(input())
X_digits = X // 100
X_mod = X % 100
i = 0

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

for a in range(20):
    i += 1
    if X_mod - 5 == 0 and X_mod - 5 >= 0:
        if i <= X_digits:
            print("1")
            sys.exit()
        else:
            break
    else:
        X_mod -= 5
        for b in range(25):
            i += 1
            if  X_mod - 4 ==0 and X_mod - 4 >= 0:
                if i <= X_digits:
                    print("1")
                    sys.exit()
                else:
                    break
            else:
                X_mod -= 4
                for c in range(34):
                    i += 1
                    if X_mod - 3 ==0 and X_mod - 3 >= 0:
                        if i <= X_digits:
                            print("1")
                            sys.exit()
                        else:
                            break
                    else:
                        X_mod -= 3
                        for d in range(50):
                            if  X_mod - 2 ==0 and X_mod - 2 >= 0:
                                if i <= X_digits:
                                    print("1")
                                    sys.exit()
                                else:
                                    break
                            else:
                                X_mod -= 2
                                for e in range(100):
                                    if X_mod - 1 == 0 and X_mod - 1 >= 0:
                                        if i <= X_digits:
                                            print("1")
                                            sys.exit()
                                        else:
                                            break
                                    else:
                                        break
print("0")

Submission status: Wrong Answer

Solution code:
X = int(input())

flag = 0
n = X // 100
left = X - 100*n

if left > 5*n:
    print(0)


else:   
    for i_2 in range(n+1):
        num = 0
        num += 5*i_2

        if num > left:
            flag = 2
            break

        for i_3 in range(n+1 - i_2):
            num += 4*i_3

            if num > left:
                flag = 2
                break

            for i_4 in range(n+1 - i_2 - i_3):
                num += 3*i_4

                if num > left:
                    flag = 2
                    break

                for i_5 in range(n+1 - i_2 - i_3 - i_4):
                    num += 2*i_5

                    if num > left:
                        flag = 2
                        break

                    for i_6 in range(n+1 - i_2 - i_3 - i_4 - i_5):
                        num += 1*i_6

                        if num == left:
                            flag = 1
                            break

                        if num > left:
                            flag = 2
                            break

                    if flag == 1 or flag == 2:
                        break
                if flag == 1 or flag == 2:
                    break
            if flag == 1 or flag == 2:
                break
        if flag == 1 or flag == 2:
            break
                

                        


    print(1 if flag == 1 else 0)

Submission status: Wrong Answer

Solution code:
X = int(input())

I = X // 100
J = X // 101
K = X // 102
L = X // 103
M = X // 104
N = X // 105
flg = False

for i in range(1,I+1):
  for j in range(1,J+1):
    for k in range(1,K+1):
      for l in range(1,L+1):
        for m in range(1,M+1):
          for n in range(1,N+1):
            if X == 100*i + 101*j + 102*k + 103*l + 104*m + 105*n:
              print(1)
              flg = True

if not flg:
  print(0)

Submission status: Wrong Answer

Solution code:
import itertools

N = int(input()) 

l1 = [100, 101, 102, 103, 104, 105]
l2 = list(range(1000))
c = 0

for i, j in itertools.product(l1, l2):
    n = i * j
    if  N == n:
      c += 1
    else:
      c += 0
if c >= 1:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
x = X%2100
c = 0
for i in range(21):
    if int(x//100) == i:
        if x%100  <= i*5:
            c=1
        else:
            continue
print(c)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(200000)

x = int(input())
p_L = [i for i in range(100,106)]

max_count = x/100 + 1
visited = []

def dfs(ans,next,counter,memo):
    global p_L
    global x
    global max_count
    global visited

    memo.append(next)
    if list(set(memo)) in visited:
        return
    visited.append(list(set(memo))) 

    ans += p_L[next]    
    if ans > x:
        return
    if max_count < counter:
        return
    elif ans == x:
        print(1)
        exit()
    
    counter += 1
    for val in range(0,6):
        dfs(ans,val,counter,memo)

counter = 0
for i in range(0,6):
    memo = [i]
    dfs(0,i,counter,memo)
print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
x1 = int(str(x)[-2:])
a,b = divmod(x1, 5)
s = (105*a)+(100+b) 
if s <= x:
    print(1)
    exit(0)
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())
r = 0
checkBoth = False
if a <=  735:
  opt = [100, 101, 102, 103, 104, 105]
  r = subset_sum(opt, a)
  print(r)
else:
  #a = a/2
  if a %2==0:
    a /=2
  else:
    checkBoth = True
    a = (a-1)/2
  opt = [100, 101, 102, 103, 104, 105,
         1000,1000,1000,1000,1000,
         10000,10000,10000,10000,
         10000,10000,100000,
         100000,100000,100000]
  
  for i in opt:
    if a % i ==0:
      r =1
      break
    if r != 1:
        if checkBoth:
            r1 = subset_sum(opt, a)
            r2 = subset_sum(opt, a + 1)
            if r1 == 1 and r2 == 1:
                r = 1
        else:
            r = subset_sum(opt, a)
  print(r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def fun(N,V):
    cnt = 0

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

    if cnt<=N and V==0:
        flag = False
        print(1)
    else:
        flag = True
    
    return flag

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

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

    while flag:
        if N >= V/5:
            flag = fun(N,V)
            N -= 1
            V += 100
        else:
            flag = False
            print(0)

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())
x1 = int(str(x)[-2:])
a,b = divmod(x1, 5)
s = (105*a)+(100+b) 
if s <= (x+100):
    print(1)
    exit(0)
print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

if x % 100 > x // 105:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys

X = int(input())
X_digits = X // 100
X_mod = X % 100
i = 0

for a in range(20):
    i += 1
    if X_mod - 5 == 0 and X_mod - 5 >= 0:
        if i <= X_digits:
            print("1")
            sys.exit()
        else:
            break
    else:
        X_mod -= 5
        for b in range(25):
            i += 1
            if  X_mod - 4 ==0 and X_mod - 4 >= 0:
                if i <= X_digits:
                    print("1")
                    sys.exit()
                else:
                    break
            else:
                X_mod -= 4
                for c in range(34):
                    i += 1
                    if X_mod - 3 ==0 and X_mod - 3 >= 0:
                        if i <= X_digits:
                            print("1")
                            sys.exit()
                        else:
                            break
                    else:
                        X_mod -= 3
                        for d in range(50):
                            if  X_mod - 2 ==0 and X_mod - 2 >= 0:
                                if i <= X_digits:
                                    print("1")
                                    sys.exit()
                                else:
                                    break
                            else:
                                X_mod -= 2
                                for e in range(100):
                                    if X_mod - 1 == 0 and X_mod - 1 >= 0:
                                        if i <= X_digits:
                                            print("1")
                                            sys.exit()
                                        else:
                                            break
                                    else:
                                        break
print("0")

Submission status: Wrong Answer

Solution code:
import sys
import math

n=int(input())
a=n%100
b=math.floor(n/100)
f=True
while b != 0:
  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()
  a+=100
  b-=1
print(0)

Submission status: Wrong Answer

Solution code:
# C - 100 to 105
X = int(input())

for a in range(500):
    for b in range(500-100*a):
        for c in range(500-100*a-101*b):
            for d in range(500-100*a-101*b-102*c):
                for e in range(500-100*a-101*b-102*c-103*d):
                    for f in range(500-100*a-101*b-102*c*103*d-104*e):
                        if 100*a+101*b+102*c+103*d+104*e+105*f == X:
                            print(1)
                            exit()
                        else:
                            pass
print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
a = list(False for i in range(x + 1))
a[0] = True
for i in range(1, x + 1):
    for j in range(5):
        if (i - 100 - j) >= 0:
            if a[(i - 100 - j)]:
                a[i] = True
if a[x]:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())

flag = 0
n = X // 100
left = X - 100*n


if left == 0:
    print(1)


else:   
    for i_2 in range(n+1):
        num = 0
        num += 5*i_2

        if num > left:
            flag = 2
            break

        for i_3 in range(n+1 - i_2):
            num += 4*i_3

            if num > left:
                flag = 2
                break

            for i_4 in range(n+1 - i_2 - i_3):
                num += 3*i_4

                if num > left:
                    flag = 2
                    break

                for i_5 in range(n+1 - i_2 - i_3 - i_4):
                    num += 2*i_5

                    if num > left:
                        flag = 2
                        break

                    for i_6 in range(n+1 - i_2 - i_3 - i_4 - i_5):
                        num += 1*i_6

                        if num == left:
                            flag = 1
                            break

                        if num > left:
                            flag = 2
                            break
                

                        


    print(1 if flag == 1 else 0)

Submission status: Wrong Answer

Solution code:
X = int(input())

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

s = X//100
t = X%100

import itertools

for a,b,c,d,e,f in itertools.product(range(s), range(s),range(s),range(s),range(s),range(s)):
  if b+2*c+3*d+4*e+5*f==t:
    print(1)
    exit()

print(0)

Submission status: Wrong Answer

Solution code:
import sys
from functools import lru_cache
n = int(input())
depth = n//100
if n%100 == 0:
    print(1)
    sys.exit()

if n > 99:
    print(0)
    sys.exit()
'''
for i,j in enumerate(str(n)):
    if i != 0 and j!=0:
        ans = i
        break
m = int(str(n)[ans:])
'''
@lru_cache(maxsize=10000)
def judge(ad,n,depth,count):
    n -= ad
    if n<0 or count > depth:
        return 0
    elif n == 0:
        return 1
    count += 1

    r1 = judge(100,n,depth,count)
    r2 = judge(101,n,depth,count)
    r3 = judge(102,n,depth,count)
    r4 = judge(103,n,depth,count)
    r5 = judge(104,n,depth,count)
    r6 = judge(105,n,depth,count)
    return max(max(r1,r2),max(max(r3,r4),max(r5,r6)))

print(judge(0,n,depth,0))

Submission status: Wrong Answer

Solution code:
x = int(input())

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

def dfs(i, sum):
    if(i == 12):
        return sum == x
    
    if (dfs(i + 1, sum)):
        return True

    if(dfs(i+1, sum + a[i])):
        return True

    return False

if(dfs(0,0)):
    print('1')
    exit()
print('0')

Submission status: Wrong Answer

Solution code:
X = int(input())
# 100 * 21 = 105 * 20, が最大の可換性であり，基本的にはあり得る組み合わせは非常に少ない.それ以外は
# 100 * 26 = 104 * 25, 100 * 101 = 101 * 100,これとかはありえない,100*51 = 102 * 50,とかはありえる
#100000/100 = 1000せいぜい商品の合計は1000子である10^3ならば10^3 ６回ループ回してもOK10^18になるけど?
import sys

for a in range(1001): # aだけは1000の場合がありうるわ
    for b in range(1000):
        for c in range(1000):
            for d in range(1000):
                for e in range(1000):
                    for f in range(1000):
                        price = a*100 + b*101 + c*102 + d*103 + e*104 + f*105
                        rest = X-price
                        if rest%100 == 0 or rest%101==0 or rest%102==0 or rest%103==0 or rest%104==0 or rest%105==0:
                            print(1)
                            sys.exit()

print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
x = X%2100
c = 0
for i in range(10):
    if int(x//100) == i:
        if x%100  <= i*5:
            c=1
        else:
            continue
print(c)

Submission status: Wrong Answer

Solution code:
amount = 10 ** 6
x = int(input())
cnt = 0
can_buy = 0

xx = x % 100
if x >= 100:
    if xx < 51:
        for i in range(xx + 1):
            for j in range(xx//2 + 1):
                for k in range(xx // 3 + 1):
                    for l in range(xx // 4 + 1):
                        for m in range(xx // 5 + 1):
                            if i + 2 * j + 3 * k + 4 * l + 5 * m == xx:
                                rest = x - 101 * i - 102 * j - 103 * k - 104 * l - 105 * m
                                cnt = rest // 100
                                if rest >= 0 and cnt <= amount:
                                    can_buy = 1
                                    break
    else:
        xx -= 50
        for i in range(xx + 1):
            for j in range(xx//2 + 1):
                for k in range(xx // 3 + 1):
                    for l in range(xx // 4 + 1):
                        for m in range(xx // 5 + 1):
                            if i + 2 * j + 3 * k + 4 * l + 5 * m == xx:
                                rest = x - 101 * i - 102 * j - 103 * k - 104 * l - 105 * m
                                cnt = rest // 100
                                if rest >= 0 and cnt + 50 <= amount:
                                    can_buy = 1
                                    break

print(can_buy)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n % 615 == 0:
	print(1)
else:
	if n%100 == 0 or n%101==0 or n%102 == 0 or n%103==0 or n%104==0 or n%105==0:
		print(1)
	elif n%206==0 or n%207==0 or n%208==0 or n%201 ==0 or n%202 == 0 or n%203==0 or n%204 == 0 or n%205 == 0:
		print(1)
	else:
		print(0)

Submission status: Wrong Answer

Solution code:
m = int(input())
a = m%100
b = 0
c = 0
d = 0
e = 0
count = 0
if a:
  b = a%5
  count += int(a/5)
if b:
  c = a%4
  count += int(b/4)
if c:
  d = a%3
  count += int(c/3)
if d:
  e = a%2
  count += int(d/2)
if e:
  f = a%1
  count += int(e/1)

re = m/100 - count
if re >= 0:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
X = int(input())

flag = 0
n = X // 100
left = X - 100*n


if left == 0:
    print(1)


else:   
    for i_2 in range(n+1):
        num = 0
        num += 5*i_2

        if num > left:
            flag = 2
            break

        for i_3 in range(n+1 - i_2):
            num += 4*i_3

            if num > left:
                flag = 2
                break

            for i_4 in range(n+1 - i_2 - i_3):
                num += 3*i_4

                if num > left:
                    flag = 2
                    break

                for i_5 in range(n+1 - i_2 - i_3 - i_4):
                    num += 2*i_5

                    if num > left:
                        flag = 2
                        break

                    for i_6 in range(n+1 - i_2 - i_3 - i_4 - i_5):
                        num += 1*i_6

                        if num == left:
                            flag = 1
                            break

                        if num > left:
                            flag = 2
                            break
                    
                    if flag == 1 or flag == 2:
                        break
                if flag == 1 or flag == 2:
                    break
            if flag == 1 or flag == 2:
                break
        if flag == 1 or flag == 2:
            break
                

                        


    print(1 if flag == 1 else 0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

n=int(input())
a=n%100
b=math.floor(n/100)
f=True
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:
# C - 100 to 105
X = int(input())

for a in range(500):
    for b in range(500-100*a):
        for c in range(500-100*a-101*b):
            for d in range(500-100*a-101*b-102*c):
                for e in range(500-100*a-101*b-102*c-103*d):
                    for f in range(500--100*a-101*b-102*c*103*d-104*e):
                        if 100*a+101*b+102*c+103*d+104*e+105*f == X:
                            print(1)
                            exit()
                        else:
                            pass
print(0)

Submission status: Wrong Answer

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

if N//105 ==0:
    min_=N//105
else:
    min_=N//105+1
max_= N//100 + 1

for m in range(min_,max_):
    X = N - 100*m
    for i in range(0,X+1):
        for j in range(0,(X-i)//2 +1):
            for k in range(0,(X-i-2*j)//3 +1):
                for l in range(0,(X-i-2*j-3*k)//4 +1):
                    temp = (X-i-2*j-3*k-4*l)
                    if (temp % 5 == 0) and (m-i-j-k-l-temp//5>0):
                        print(1)
                        #print(m,m-i-j-k-l-temp//5,i,j,k,l,temp // 5)
                        sys.exit()
else:
    print(0)

Submission status: Wrong Answer

Solution code:
m = int(input())
a = m%100
b = 0
c = 0
d = 0
e = 0
count = 0
if int(a%5):
  b = a%5
  count += int(a/5)
if int(b%4):
  c = a%4
  count += int(b/4)
if int(c%3):
  d = a%3
  count += int(c/3)
if int(d%2):
  e = a%2
  count += int(d/2)
if e:
  f = a%1
  count += int(e/1)

re = m/100 - count
if re >= 0:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
X=int(input())
if 1<= X <= 99 or 106<= X <=199 or 211<= X <= 299 or 316<= X <=399 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 or 1156<= X <=1199 or 1261<= X <= 1299 or 1366<= X <=1399 or 1471<= X <= 1499or 1576<= X <= 1599 or 1676<= X <=1699 or 1781<= X <= 1799 or 1886<= X <=1899 or 1991<= X <= 1999or 2096<= X <= 2099   :
    print(0)
else:
    print(1)

Submission status: Wrong Answer

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

n = X // 101
a = 101 * n
b = 105 * n

if a <= X <= b:
    print(1)
elif X >= 2525:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
arr = 615
if (X==arr):
	print('1')
else:
	print('0')

Submission status: Wrong Answer

Solution code:
def fun(N,V):
    cnt = 0

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

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

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

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

    while flag:
        if N >= V/5:
            flag = fun(N,V)
            N -= 1
            V += 100
        else:
            flag = False
            print(0)

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
X = int(input())

q, r = divmod(X, 100)

if r == 0:
    print(1)
    quit()

cnt = 0
for i in reversed(range(1, 6)):
    a, r = divmod(r, i)
    if r == 0:
        break
    cnt += a

if cnt <= q:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys

n=int(input())
a=n%100
f=True
for i in range(a):
  for j in range(a-i):
    for k in range(a-i-j):
      for l in range(a-i-j-k):
        for m in range(a-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())
ans = 0
p = x%615
if x>=615:
    if p!=100 and p!=101 and p!=102 and p!=103 and p!=104 and p!=105 and p!=0:
        print("0")
    else:
        print("1")
else:
    for a in range(0,6):
        for b in range(0,6):
            for c in range(0,6):
                for d in range(0,6):
                    for e in range(0,6):
                        if x==100*a + 101*b + 102*c + 104*d + 105*e:
                            ans = 1
                            break
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())

flag = 0
n = X // 100
left = X - 100*n


if left == 0:
    print(1)


else:   
    for i_2 in range(n+1):
        num = 0
        num += 5*i_2

        if num > left:
            flag = 2
            break

        for i_3 in range(n+1 - i_2):
            num += 4*i_3

            if num > left:
                flag = 2
                break

            for i_4 in range(n+1 - i_2 - i_3):
                num += 3*i_4

                if num > left:
                    flag = 2
                    break

                for i_5 in range(n+1 - i_2 - i_3 - i_4):
                    num += 2*i_5

                    if num > left:
                        flag = 2
                        break

                    for i_6 in range(n+1 - i_2 - i_3 - i_4 - i_5):
                        num += 1*i_6

                        if num == left:
                            flag = 1
                            break

                        if num > left:
                            flag = 2
                            break
                    
                    if flag == 1 or flag == 2:
                        break
                if flag == 1 or flag == 2:
                    break
            if flag == 1 or flag == 2:
                break

                        


    print(1 if flag == 1 else 0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(1 if (lambda x: sum([i*100<=x and x<=i*106 for i in range(101010)]))(int(input())) else 0)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n % 615 == 0:
	print(1)
else:
	if n%100 == 0 or n%101==0 or n%102 == 0 or n%103==0 or n%104==0 or n%105==0:
		print(1)
	elif n%201 ==0 or n%202 == 0 or n%203==0 or n%204 == 0 or n%205 == 0:
		print(1)
	else:
		print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())

flag = 0
n = X // 100
left = X - 100*n


if left == 0:
    print(1)


else:   
    for i_2 in range(n):
        num = 0
        num += 5*i_2

        if num > left:
            flag = 2
            break

        for i_3 in range(n - i_2):
            num += 4*i_3

            if num > left:
                flag = 2
                break

            for i_4 in range(n - i_2 - i_3):
                num += 3*i_4

                if num > left:
                    flag = 2
                    break

                for i_5 in range(n - i_2 - i_3 - i_4):
                    num += 2*i_5

                    if num > left:
                        flag = 2
                        break

                    for i_6 in range(n - i_2 - i_3 - i_4 - i_5):
                        num += 1*i_6

                        if num == left:
                            flag = 1
                            break

                        if num > left:
                            flag = 2
                            break
                    
                    if flag == 1 or flag == 2:
                        break
                if flag == 1 or flag == 2:
                    break
            if flag == 1 or flag == 2:
                break

                        


    print(1 if flag == 1 else 0)

Submission status: Wrong Answer

Solution code:
print(1 if (lambda x: sum([ i*100<=x and x<=i*106 for i in range(10101)]))(int(input())) else 0)

Submission status: Wrong Answer

Solution code:
x = int(input())
x1 = int(str(x)[-2:])
a,b = divmod(x1, 5)
s = (105*a)+(100+b) 
if s < (x+100) or s == x:
    print(1)
    exit(0)
print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

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

def dfs(i, sum):
    if(i == 6):
        return sum == x
    
    if (dfs(i + 1, sum)):
        return True

    if(dfs(i+1, sum + a[i])):
        return True

    return False

if(dfs(0,0)):
    print('1')
    exit()
print('0')

Submission status: Wrong Answer

Solution code:
import sys

X = int(input())

x = X // 100
if x * 5 < (X -( X // 100 * 100)):
    print(0)
    sys.exit()

if (x + 5) // 5 < x:
    print(1)

else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
if(X>=1 or X<=1000000):
	arr = [100, 101, 102, 103, 104, 105, 201, 202, 203, 204, 205, 206, 207, 208, 209, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 406, 407, 408, 409, 410, 411, 412, 510, 511, 512, 513, 514, 515, 615]
	if (X in arr):
		print('1')
	else:
		print('0')

Submission status: Wrong Answer

Solution code:
X = int(input())

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

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

cnt = X // 100
zan = X % 100

if cnt > zan:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
def re(y, m, sm):
    if sm==m: return y
    elif y==0: return -1
    else: return max([re(y-1, m, sm+100+i) for i in range(6)])

x = int(input())

ans = 0
while 1:
    x, m = divmod(x, 100)
    if x<1:
        print(0)
        exit()
    y = x%10

    ret = re(y, y*100+m, 0)
    x -= y-ret
    if(x==0): break
    if ret<0:
        print(0)
        exit()
print(1)

Submission status: Wrong Answer

Solution code:
print(1 if (lambda x: sum([ [j for j in range(100*i,106*i+1)].count(x) for i in range(1010)]))(int(input())) else 0)

Submission status: Wrong Answer

Solution code:
from itertools import combinations_with_replacement

X = int(input())

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

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

cnt = X // 100
zan = X % 100

if cnt > zan:
    print(0)
    exit()

for c in combinations_with_replacement([0, 1,2,3,4,5], cnt):
    if sum(c) == zan:
        print(1)
        exit()
print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
N = int(X // 100 + 1)
li = [100, 101, 102, 103, 104, 105] * N

dp = [[0] * (X + 1) for _ in range(N * 6 + 1)]
dp[0][0] = True

for i in range(N * 6):
    for j in range(X + 1):
        if j >= li[i]:
            dp[i + 1][j] = dp[i][j - li[i]] or dp[i][j]
        else:
            dp[i + 1][j] = dp[i][j]

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