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
s = []
for i in range(0,5):
    for j in range(0,5):
        for _ in range(0,5):
            for k in range(0,5):
                for p in range(0,5):
                    for t in range(0,5):
                        s.append(100*i+101*j+102*_+103*k+104*p+105*t)
l = set(s)
Ls = list(l)
Ls.remove(0)
for i in range(len(Ls)):
    if X%Ls[i] == 0:
        ans += 1
        print(1)
        break
if ans == 0:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
flag=False

if X>=2000:
  print(1)
else:
  for i in range(0,21):
    for j in range(0,21-i):
      for k in range(0,21-i-j):
        for l in range(0,21-i-j-k):
          for m in range(0,21-i-j-k-l):
            for n in range(0,21-i-j-k-l-m):
              if 100*i+101*j+102*k+103*l+104*m+105*n==X:
                print(1)
                flag=True
                break
              
if flag==False:
  print(0)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import itertools
import math
X = int(stdin.readline().rstrip())

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

tmp_list = []
for i in range(1,5+1):
    tmp = [sum(m) for m in itertools.combinations(item, i)]
    tmp_list.append(tmp)
res = list(itertools.chain.from_iterable(tmp_list))
res.append(615)
if 0 in [X%item for item in res]:
    print('1')
else:
    print('0')

Submission status: Wrong Answer

Solution code:
x = int(input())
amari = x%100
tiket = x//100
ans = 0
i = 0
if amari == 0:
    ans = 1
while (tiket > 0 and i < 5):
  print(i,amari,tiket)
  tiket -= amari//(5-i)
  amari = amari % (5-i)
  i += 1
  if (amari == 0 and tiket>=0):
    ans = 1
    break
print(ans)

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 - head*(10**(l-1))
#print(tail)
if tail > 5*head*(10**(l-2)):
	print(0)
else :
	print(1)

Submission status: Wrong Answer

Solution code:
import itertools
X = int(input())
price=[100,101,102,103,104,105]
state=False
for i in range(1,7):
    for j in itertools.combinations_with_replacement(price, i):
        if sum(j) == X:
            print(1)
            state=True
            exit()
if state != True:
    print(0)

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
if x >=  2000:
    print(1)
elif x <= 99:
    print(0)
else:
    a = round(x / 100)
    b = x % 100
    if b > 5*a:
        print(0)
    else:
        print(1)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import itertools
import math
X = int(stdin.readline().rstrip())

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

tmp_list = []
for i in range(1,5+1):
    tmp = [sum(m) for m in itertools.combinations(item, i)]
    tmp_list.append(tmp)
res = list(itertools.chain.from_iterable(tmp_list))
res.append(615)
print(res)
if 0 in [X%item for item in res]:
    print('1')
else:
    print('0')

Submission status: Wrong Answer

Solution code:
X = int(input())
items = range(1, 6)

lim = X%1000 - X%100
lim = lim//100


def cal(x, b, c):
    if c > lim:
        return

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

    for i in items[b::]:
        if x >= i:
            # print(x, i, x-i)
            cal(x-i, i-1, c+1)
        else:
            break


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

cal(X % 100, 0, 0)
print(0)

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 - head*(10**(l-1))
print(tail)
if tail > 5*head*(10**(l-2)):
	print(0)
else :
	print(1)

Submission status: Wrong Answer

Solution code:
X=int(input())
flag=0

if X<2000:
    for i in range(1,19):
        if(i*100<=X<=i*100+i*5):
            print(1)
            flag =1
            break
    if flag!= 1:
        print(0)
elif X>=2000:
    print(1)

Submission status: Wrong Answer

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

if x2==0:
  print('1')
else:
  tmp=0
  for f in range(20,0,-1):
    if 5*f==x2:
      tmp=105*f
      break
    elif 5*f<x2:
      x2 -= 5*f
      tmp = 105*f + x2 
      break
      
  if tmp>X:
    print('0')
  else:
    print('1')

Submission status: Wrong Answer

Solution code:
X = int(input())

last_two = X % 100
other = X - last_two
# print(last_two)
count = 0
flag = 0

for i in range(5, 0, -1):
    # print(i)
    count += last_two // i
    if last_two % i == 0:
        if count <= other // 100:
            flag = 1
            break
if flag == 1:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
items = range(1, 6)

lim = X%1000 - X%100
lim = lim//100


def cal(x, b, c):
    if x == 0:
        print(1)
        exit()

    if c > lim:
        return

    for i in items[b::]:
        if x >= i:
            # print(x, i, x-i)
            cal(x-i, i-1, c+1)
        else:
            break


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

cal(X % 100, 0, 0)
print(0)

Submission status: Wrong Answer

Solution code:
X=int(input())
U=X-X//100*100
for i in range(X//100):
    if U>=5:
        U-=5
    elif U>=4 and U<5:
        U-=4
    elif U>=3 and U<4:
        U-=3
    elif U>=2 and U<3:
        U-=2
    elif U>=1 and U<2:
        U-=1
    elif U>=0 and U<1:
        U-=0
if U==0:
    print(1) 
elif U<0 or U>1:
    print(0)

Submission status: Wrong Answer

Solution code:
import random

print(random.randint(0,1))

Submission status: Wrong Answer

Solution code:
x = int(input())

n = x // 105 + 1
flag = False

for a in range(n):
    for b in range(n - a):
        if b >= 0:
            for c in range(n - b):
                if c >= 0:
                    for d in range(n - c):
                        if d >= 0:
                            for e in range(n - d):
                                if e >= 0:
                                    val = x - a * 100 - b * 101 - c * 102 - d * 103 - e * 104 - (
                                            n - a - b - c - d - e) * 105
                                    if val == 0:
                                        flag = True
                                        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:
X = int(input())

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

pre_list = []
sum_value = 0
for i in range(1, 1001):
    tmp_list = []
    for value in item_list:
        tmp_list.append(i * value)
    
    pre_list.append(tmp_list)

sum_list = [[0] * 6 for i in range(1000)]
for i in range(1000):
    for j in range(6):
        if i == 0:
            sum_list[i][j] = sum_list[i][j - 1] + pre_list[i][j]
        elif j == 0:
            sum_list[i][j] = sum_list[i - 1][j] + pre_list[i][j]
        else:
            sum_list[i][j] = sum_list[i - 1][j] + sum_list[i][j - 1] - sum_list[i - 1][j - 1] + pre_list[i][j]

flag = 0
for i1 in range(0, 1000):
    for i2 in range(i1, 1000):
        for j1 in range(0, 6):
            for j2 in range(j1, 6):
                if i1 == i2:
                    value = sum_list[i1][j2] - sum_list[i1][j1]
                elif j1 == j2:
                    value = sum_list[i2][j2] - sum_list[i1][j2]
                elif i1 == i2 == j1 == j2 == 0:
                    value = sum_list[i1][j1]
                else:
                    value = sum_list[i2][j2] - sum_list[i1][j2] - sum_list[i2][j1] + sum_list[i1][j1]  
                if X == value:
                    flag = 1

print(flag)

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 <= amount:
                                    can_buy = 1
                                    break

print(can_buy)

Submission status: Wrong Answer

Solution code:
x = int(input())

# 最大n個は買う必要がある
n = x // 100

# 最低m個買う必要がある
m = x // 105

ans = 0
# もし割り切れたら、OK
for i in range(100,106):
  if x % i == 0:
    ans = 1
    break

y = x % 100

import itertools
shinamono = [0,1,2,3,4,5] * (n%100)
for i in range(m,n+1):
  if ans == 1:
    break
  a = itertools.combinations(shinamono, i)
  for j in a:
    if sum(j) == y:
      ans = 1
      break

print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())
items = range(1, 6)

lim = X%1000 - X%100
lim = lim//100


def cal(x, b, c):
    if x == 0:
        if c == lim:
            print(1)
            exit()
        else:
            return

    if c > lim:
        return

    for i in items[b::]:
        if x >= i:
            # print(x, i, x-i)
            cal(x-i, i-1, c+1)
        else:
            break


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

cal(X % 100, 0, 0)
print(0)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import itertools
import math
X = int(stdin.readline().rstrip())

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

tmp_list = []
for i in range(1,5+1):
    tmp = [sum(m) for m in itertools.combinations(item, i)]
    tmp_list.append(tmp)
res = list(itertools.chain.from_iterable(tmp_list))

if 0 in [X%item for item in res]:
    print('1')
else:
    print('0')

Submission status: Wrong Answer

Solution code:
line = input()

if int(line) >= 100:
    num = int(line[-2:])
    item_number = int(line[:-2])



    res_list = []
    a = 5
    while True:
        for _ in range(num//a):
            res_list.append(a)

        num = num % a

        if 1<= num <= 4:
            res_list.append(num)
            break
        if num == 0:
            break

    print(res_list)

    if len(res_list) > item_number:
        print(0)
    else:
        print(1)

else:
    print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())
left = n//100
n = n%100
pay = 0
chance = 0
for i in range(5, 0,-1):
	pay+=n//i
	chance+=(n%i)
	n=n/i
# print(pay,chance)
if pay<left-1:
	print(1)
else:
	print(0)

Submission status: Wrong Answer

Solution code:
from math import floor
N = int(input())

def doit(N):

	xmin = N / 1.08
	xmax = (N + 1) / 1.08

	if floor(xmin) == xmin:
		return(int(xmin))
	elif floor(xmax) == xmax:
		return(int(xmax))
	else:
		if floor(xmin) == floor(xmax):
			return(":(")
		if floor(xmin) + 1 == floor(xmax):
			return(floor(xmax))

print(doit(N))

Submission status: Wrong Answer

Solution code:
x = int(input())

n = x // 105 + 1
print(n)
flag = False

for a in range(n):
    for b in range(n - a):
        if b >= 0:
            for c in range(n - b):
                if c >= 0:
                    for d in range(n - c):
                        if d >= 0:
                            for e in range(n - d):
                                if e >= 0:
                                    val = x - a * 100 - b * 101 - c * 102 - d * 103 - e * 104 - (
                                            n - a - b - c - d - e) * 105
                                    if val == 0:
                                        flag = True
                                        break
                            if flag:
                                break
                    if flag:
                        break
            if flag:
                break
    if flag:
        break

print(0) if flag == False else print(1)

Submission status: Wrong Answer

Solution code:
X = int(input())
li = [100,101,102,103,104,105]

def subsets_with_sum(li, target, with_replacement=False):
    x = 0 if with_replacement else 1
    def _a(idx, l, r, t):
        if t == sum(l): r.append(l)
        elif t < sum(l): return
        for u in range(idx, len(li)):
            _a(u + x, l + [li[u]], r, t)
        return r
    return _a(0, [], [], target)
  
if len(subsets_with_sum(li, X))>0:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
X=int(input())
flag=0

if X<2000:
    for i in range(2,19):
        if(i*100<=X<=i*100+i*5):
            print(1)
            flag =1
            break
    if flag!= 1:
        print(0)
elif X>=2000:
    print(1)

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)]
    for i in range(NA+1):
        dp[i][0] = True
    if X >= 2500:
        return 1
    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 1 if dp[NA-1][X] else 0
    
if __name__ == '__main__':
    inputs = read()
    output = solve(*inputs)
    print("%d" % output)

Submission status: Wrong Answer

Solution code:
def subset_sum(numbers, target, partial=[]):
    s = sum(partial)
 
    # check if the partial sum is equals to target
    if s == target: 
        print("1")
        return
    if s > target:
        print("0")
        exit()
 
    for i in range(len(numbers)):
        n = numbers[i]
        remaining = numbers[i+1:]
        subset_sum(remaining, target, partial + [n]) 
 
N = int(input())        
subset_sum([100,101,102,103,104,105],N)

Submission status: Wrong Answer

Solution code:
X = int(input())
items = range(1, 6)

lim = X%1000 - X%100
lim = lim//100


def cal(x, b, c):
    if x == 0:
        if c == lim:
            print(1)
            exit()
        else:
            return

    if c > lim:
        return

    for i in items[b::]:
        if x >= i:
            # print(x, i, x-i)
            cal(x-i, i-1, c+1)
        else:
            break


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

cal(X % 100, 0, 0)
print(0)

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
ans = 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 ans == tmp:
                            print('1')
                            sys.exit()
print('0')

Submission status: Wrong Answer

Solution code:
n = int(input())
left = n//100
n = n%100
pay = 0
chance = 0
for i in range(5, 0,-1):
	pay+=n//i
	chance+=(n%i)
	n=n/i
# print(pay,chance)
if pay<left:
	print(1)
else:
	print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())

a = X%100
b = a//5

if b < X//100:print(1)
else:print(0)

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
#lower
abcde = X // 102
db = X % 2
ae = (X - db - 102 * abcde) // 2
if ae + db <= abcde:
    print(1)
    exit()
#greater
abcde = math.ceil(X / 102)
db = X % 2
ae = (102 * abcde - X - db) // 2
if ae + db <= abcde:
    print(1)
    exit()
print(0)

Submission status: Wrong Answer

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


for a in range(x):
    cost0 = 0
    cost0 += 100 * a
    if cost0 > X:
        break
    if cost0 == X:
        print(1)
        exit()

    for b in range(x):
        cost1 = cost0 + 101 * b
        if cost1 > X:
            break
        if cost1 == X:
            print(1)
            exit()

        for c in range(x):
            cost2 = cost1 + 102 * c
            if cost2 > X:
                break
            if cost2 == X:
                print(1)
                exit()

            for d in range(x):
                cost3 = cost2 + 103 * d
                if cost3 > X:
                    break
                if cost3 == X:
                    print(1)
                    exit()

                for e in range(x):
                    cost4 = cost3 + 104 * e
                    if cost4 > X:
                        break
                    if cost4 == X:
                        print(1)
                        exit()

                    for f in range(x):
                        cost5 = cost4 + 105 * f
                        if cost5 > X:
                            break
                        if cost5 == X:
                            print(1)
                            exit()
print(0)

Submission status: Wrong Answer

Solution code:
x=int(input())
m=int(x%100)
n=int(x/100)
c=0
if n<m:
  for i in range(n+1):
    for j in range(n+1-i):
      for k in range(n+1-i-j):
        for s in range(n+1-i-j-k):
          if 1*i+2*j+3*k+4*s+5*(n+1-i-j-k-s)==m:
            c=1
            break
          
else:
   c=1
    
if c==1:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
prices = [100, 101, 102, 103, 104, 105]

def subsets_with_sum(lst, target, with_replacement=False):
    x = 0 if with_replacement else 1
    def _a(idx, l, t):
      ret = False
      if t < sum(l) or sum(l) > 100000: 
        pass
      elif t == sum(l): 
        ret = True

      else:
        for u in range(idx, len(lst)):
          ret = _a(u + x, l + [lst[u]], t)
          if ret:
            break
      return ret
    return _a(0, [], target)

ans = subsets_with_sum(prices, x)

if ans:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
X = int(input())
divisions_100 = X//100
residuals = X%100
n_100 = 0
for i in range(1,6)[::-1]:
    n_100 += residuals // i
    if residuals % i == 0:
        break
if n_100 <= divisions_100:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

    while X >= 100:
        for item in (105, 104, 103, 102, 101, 100):
            if X - item >= 0:
                X -= item
                break
        if X % 100 == 0:
            X = 0
            break
    return '1' if X == 0 else '0'

print(c_100_to_105())

Submission status: Wrong Answer

Solution code:
X = int(input())
items = range(1, 6)

lim = X%1000 - X%100
lim = lim//100


def cal(x, b, c):
    if x == 0:
        if c == lim:
            print(1)
            exit()
        else:
            return

    if c > lim:
        return

    for i in items[b::]:
        if x >= i:
            # print(x, i, x-i)
            cal(x-i, i-1, c+1)
        else:
            break



cal(X % 100, 0, 0)
print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
item_num = x // 100

def brute(t):
    for i in range(t):
        for j in range(t):
            for k in range(t):
                for l in range(t):
                    for m in range(t):
                        for n in range(t):
                            total = i + j + k + l + m + n
                            if total == t and (100 * i + 101 * j + 102 * k +  103 * l + 104 * m + 105 * n ) == x:
                                return 1
    return 0

print(brute(item_num))

Submission status: Wrong Answer

Solution code:
price = [100,101,102,103,104,105]

X = int(input())


def Judge(price, X):
  #初期化おまじない
    N=len(price)
    dp=[[0 for i in range(X+1)] for j in range(N+1)]
    dp[0][0]=1

  #動的計画法
    for i in range(N):
        for j in range(X+1):
            if price[i]<=j: #i+1番目の数字a[i]を足せるかも?
                dp[i+1][j]=dp[i][j-price[i]] or dp[i][j]
            else: #だめだったよお
                dp[i+1][j]=dp[i][j]
    
    print(dp[N][X])

Judge(price, X)

Submission status: Wrong Answer

Solution code:
n=int(input())

if n == 100 or n==101 or n==102 or n==103 or n==104 or n==105:
  print(1)
  exit()

item=n//100
money = n-item*100
while money<item:
  item -=1
  money = n-item*100

if item*5 < money:
  print(0)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
line = input()

if int(line) >= 100:
    num = int(line[-2:])
    item_number = int(line[:-2])+1



    res_list = []
    a = 5
    while True:
        for _ in range(num//a):
            res_list.append(a)

        num = num % a

        if num <= 4:
            res_list.append(num)
            break

    # print(res_list)

    if len(res_list) > item_number:
        print(0)
    else:
        print(1)

else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
divisions_100 = X//100
residuals = X%100
n_100 = 0
for i in range(1,6)[::-1]:
    n_100 += residuals // i
    if residuals % i == 0:
        break
if n_100 < divisions_100:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import itertools

X = int(input())
pd = (101,102,103,104,105)
count = int(X / 105)
ans = 0
for i in itertools.combinations_with_replacement(pd,count):
    if sum(i) == X:
        ans = 1
        break
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
if len(str(x)) < 3:
  print(0)
else:  
  print("1" if x//100 > x/105 else "0")

Submission status: Wrong Answer

Solution code:
def main():

    x = int(input())
    x_amari = x%100
    #print(x_100)

    x_100 = x//100

    x_1 = x_amari//1
    x_2 = x_amari//2
    x_3 = x_amari//3
    x_4 = x_amari//4
    x_5 = x_amari//5

    if x_100 >= (x_5+1):
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
X=int(input())

if 105-X%105<=5*((X//105)+1):
    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:
            break

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

            if num > left:
                break

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

                if num > left:
                    break

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

                    if num > left:
                        break

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

                        if num == left:
                            flag = 1
                            break

                        if num > left:
                            break

                        


    print(1 if flag == 1 else 0)

Submission status: Wrong Answer

Solution code:
x = int(input())
n = x//100 + 1
 
for i in range(n):
  for j in range(n):
     for k in range(n):
         for l in range(n):
             for m in range(n):
                 c = 100*i + 101*j + 102*k + 103*l + 104*m
                 if x > c:
                    t = x-c
                
                    if t%105 == 0:
                        print(1)
                        exit()
                    
print(0)

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 - head*(10**(l-1))
#print(tail)
if tail > 5*head:
	print(0)
else :
	print(1)

Submission status: Wrong Answer

Solution code:
import math

x = int(input())
if x < 100:
  print('0')
  exit()
n = x // 100
if (x % 100) // 5 <= n:
  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
    if n <= 100:
        return 0
    if n <= 105:
        return 1
        
    table[100] = 1
    table[101] = 1
    table[102] = 1
    table[103] = 1
    table[104] = 1
    table[105] = 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 count(S, 7, X):
        print(1)
    else:
        print(0)
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:

x = int(input())
prices = [100, 101, 102, 103, 104, 105]


def subsets_with_sum(lst, target, with_replacement=False):
    x = 0 if with_replacement else 1
    def _a(idx, l, t):
      ret = False
      if t == sum(l): 
        ret = True
      elif t < sum(l): 
        pass
      else:
        for u in range(idx, len(lst)):
          ret = _a(u + x, l + [lst[u]], t)
          if ret:
            break
      return ret
    return _a(0, [], target)

ans = subsets_with_sum(prices, x)

if ans:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
import math
import sys


X = int(input())

minkosu = math.ceil(X/105)
maxkosu = math.floor(X/100)

for kosu in range(minkosu, maxkosu+1):
    if(X-100*kosu < 5*kosu):
        print("1")
        sys.exit()

print("0")

Submission status: Wrong Answer

Solution code:
X=int(input())

if X%105<=5*((X//105)+1):
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
last2 = int(str(X)[-2:])
XX_n = int((X - last2)/100)
n5 = int(last2/5)
n4 = int(last2%5/4)
n3 = int(last2%5%4/3)
n2 = int(last2%5%4%3/2)
n1 = int(last2%5%4%3%2)
if XX_n>n1+n2+n3+n4+n5:
    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, 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())

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

pre_list = []
sum_value = 0
for i in range(1, 1001):
    tmp_list = []
    for value in item_list:
        tmp_list.append(i * value)
    
    pre_list.append(tmp_list)

sum_list = [[0] * 6 for i in range(1000)]
for i in range(1000):
    for j in range(6):
        if i == 0:
            sum_list[i][j] = sum_list[i][j - 1] + pre_list[i][j]
        elif j == 0:
            sum_list[i][j] = sum_list[i - 1][j] + pre_list[i][j]
        else:
            sum_list[i][j] = sum_list[i - 1][j] + sum_list[i][j - 1] - sum_list[i - 1][j - 1] + pre_list[i][j]

flag = 0
for i1 in range(0, 1000):
    for i2 in range(i1+1, 1000):
        for j1 in range(0, 6):
            for j2 in range(j1+1, 6):
                value = sum_list[i2][j2] - sum_list[i1][j2] - sum_list[i2][j1] + sum_list[i1][j1]  
                if X == value:
                    flag = 1

print(flag)

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 % 200 == 0 or 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 % 300 == 0 or X % 301 == 0 or X % 302 == 0 or 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 % 400 == 0 or X % 401 == 0 or X % 402 == 0 or X % 403 == 0 or X % 404 == 0 or X % 405 == 0 or 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 % 500 == 0 or X % 501 == 0 or X % 502 == 0 or X % 503 == 0 or X % 504 == 0 or X % 505 == 0 or X % 506 == 0 or X % 507 == 0 or X % 508 == 0 or X % 509 == 0 or 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 % 600 == 0 or X % 601 == 0 or X % 602 == 0 or X % 603 == 0 or X % 604 == 0 or X % 605 == 0 or X % 606 == 0 or X % 607 == 0 or X % 608 == 0 or X % 609 == 0 or X % 610 == 0 or X % 611 == 0 or X % 612 == 0 or X % 613 == 0 or X % 614 == 0 or X % 615 == 0:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())

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

X100over = X//100
X10 = X%100

X5 = X10//5
X1to4 = X10%5 !=0

if X5+X1to4 < X100over:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X=int(input())

if X%105<=5*(X//100+1):
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
li = [100, 101, 102, 103, 104, 105]

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

for i in range(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[6][X]:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
a = x%100
ans = 0
MAX = 1000000

if x < 100:
    ans = 0
elif math.ceil(a//5) <= x//100:
    if min(x//100, MAX)*100 + min(x//101, MAX)*101 + min(x//102, MAX)*102 + min(x//103, MAX)*103 + min(x//104, MAX)*104 >= x:
        ans = 1
    
print(ans)

Submission status: Wrong Answer

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

X = int(input())

l = []
for i in range(1001):
    l.extend(list(range(i*100+1, 105*i+1)))


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

Submission status: Wrong Answer

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

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


if X < 100:
    print(0)
    sys.exit()
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 != 0:
         if  X % s == 0:
            ans = 1
   

print(ans)

Submission status: Wrong Answer

Solution code:
import math

x = int(input())

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