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:
n=int(input())
a=n%100
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)
print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())

if X <= 99:
  print("0")
else:
  keta = X % 100  
  mai = keta // 5
  betu_mai = keta - mai * 5
  min = 105 * mai + int(str("10" + str(betu_mai)))
  if min <= X:
    print("1")
  else:
    print("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([1,2,3,4,5], cnt):
    if sum(c) == zan:
        print(1)
        exit()
print(0)

Submission status: Wrong Answer

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

if X>=2100:
  print(1)
else:
  for i in range(0,22):
    for j in range(0,22-i):
      for k in range(0,22-i-j):
        for l in range(0,22-i-j-k):
          for m in range(0,22-i-j-k-l):
            for n in range(0,22-i-j-k-l-m):
              if 100*i+101*j+102*k+103*l+104*m+105*n==X:
                if flag==False:
                  print(1)
                  flag=True
                  break
              
if flag==False:
  print(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:
import sys
n = int(input())
t = n//615
ans = n%615
for h in range(t):
    ans+=615*h
    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()
                            elif ans < tmp:break
print('0')

Submission status: Wrong Answer

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

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


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

    if x == 0:
        if c == lim:
            print(1)
            exit()
        else:
            return

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


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

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

def is_possible(q, mod):

    for i in range((mod//5)+1):
        if 5 * i > mod:
            break
        for j in range((mod//4)+1):
            if (5 * i) + (4 * j) > mod:
                break
            for k in range((mod//3)+1):
                if (5 * i) + (4 * j) + (3 * k) > mod:
                    break
                for l in range((mod//2)+1):
                    if (q - (i + j + k + l)) >= mod - ((5 * i) + (4 * j) + (3 * k) + (2 * l)):
                        return True
                    elif (5 * i) + (4 * j) + (3 * k) + (2 * l) > mod:
                        break

    return False


X = int(input())
q, mod = divmod(X, 100)

if is_possible(q, mod):
    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(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())
li = [100,101,102,103,104,105]

def subsets_with_sum(lst, target, subset_lengths=range(1, 1000), method='combinations'):   
    import itertools
    return [comb for i in subset_lengths for comb in
            getattr(itertools, method)(lst, i) if sum(comb) == target]

#print(subsets_with_sum(li, X))
  
if len(subsets_with_sum(li, X))>0:
  print(1)
else:
  print(0)

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 or n==200 or n==201 or n==300 or n==301 or n==302 or n==400 or n==401 or n==402 or n==403 or n==500 or n==501 or n==502 or n==503 or n==504 :
  print(1)
  exit()
if n%100==0:
  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:
x=int(input())
 
if 2000<=x:
    print(1)
if 100>x:
    print(0)
 
a=x//100
if a*100<=x and x<=a*105:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

n1 = -(-x//105)
n2 = x//105

if 105*n1 - 5*n1 < x and x >= 100:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
print(1)

Submission status: Wrong Answer

Solution code:
x = int(input())

n1 = -(-x//105)
n2 = x//105

if 105*n1 - 5*n1 < x and x <= 100:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
if x < 100:
	print(0)
	exit()
if x>94500:
	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())
if 100< X and X%100 < (X/100)*5:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
t = n//615
ans = n%615
for h in range(t):
    ans=615*h
    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()
                            elif ans < tmp:break
print('0')

Submission status: Wrong Answer

Solution code:
x = int(input())
f = (x%100)//5
ff = (x%100)%5
a = [0,101,102,103,104]
if 105*f+a[ff]*ff <= x:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import math


def isPrime(n):
  if n == 2:
    return True
  if n % 2 == 0:
    return False
  
  # nの平方根まで計算する
  m = math.floor(math.sqrt(n)) + 1
  for p in range(3, m, 2):
      if n % p == 0:
        return False
  return True


N = int(input())

if isPrime(N) == True:
  print(0)
  exit()
  

for a in range(N // 100 + 1):
  for b in range(N // 101 + 1):
    for c in range(N // 102 + 1):
      for d in range(N // 103 + 1):
        for e in range(N // 104 + 1):
          for f in range(N // 105 + 1):
            if a * 100 + b * 101 + c * 102 + d * 103 + e * 104 + f * 105 == N:
              print(1)
              exit()
print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

n1 = -(-x//105)
n2 = x//105

if 105*n1 - 5*n1 < x or 100*n2 + 5*n2 > x:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
ans = 0
ls1 = [100,101,102,103,104,105]
ls2 = [201,202,203,204,205,206,207,208,209]
ls3 = [303,304,305,306,307,308,309,310,311,312]
ls4 = [406,407,408,409,410,411,412,413,414]
ls5 = [510,511,512,513,514,515]
for i in range(len(ls1)):
    if X%ls1[i] == 0:
        ans += 1
        print(1)
        break
if ans == 0:
    for i in range(len(ls2)):
        if X%ls2[i] == 0:
            ans += 1
            print(1)
            break
if ans == 0:
    for i in range(len(ls3)):
        if X%ls3[i] == 0:
            ans += 1
            print(1)
            break
if ans == 0:
    for i in range(len(ls4)):
        if X%ls4[i] == 0:
            ans += 1
            print(1)
            break
if ans == 0:
    for i in range(len(ls5)):
        if X%ls5[i] == 0:
            ans += 1
            print(1)
            break
if ans == 0:
    if X%615 == 0:
        ans += 1
        print(1)
if ans == 0:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())

if X <= 99:
  print("0")
else:
  keta = X % 100  
  mai = keta // 5
  betu_mai = keta - mai * 5
  
  if 105 * mai + int(str("10" + str(betu_mai)))*betu_mai <= X:
    print("1")
  else:
    print("0")

Submission status: Wrong Answer

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

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

for i in range(N):
    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)

Submission status: Wrong Answer

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

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


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

    if x == 0:
        if c == lim:
            print(1)
            exit()
        else:
            return

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


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

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

Submission status: Wrong Answer

Solution code:
from pprint import pprint
import sys


def solve(n):
    for i in range(1001):
        for j in range(1001 - i):
            for k in range(1001 - i - j):
                sum_h = i + j + k
                Y = 105 * i + 104 * j + 103 * k
                if Y == n:
                    print(1)
                    return
    for i in range(1001 - sum_h):
        for j in range(1001 - sum_h - i):
            for k in range(1001 - sum_h - i - j):
                X = 102 * i + 101 * j + 100 * k
                if X + Y == n:
                    print(1)
                    return
    
    print(0)
    

if __name__ == "__main__":
    n = int(sys.stdin.readline().strip())
    solve(n)

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 or X % 210 == 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 or X % 313 == 0 or X % 314 == 0 or X % 315 == 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 or X % 415 == 0 or X % 416 == 0 or X % 417 == 0 or X % 418 == 0 or X % 419 == 0 or X % 420 == 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 or X % 516 == 0 or X % 517 == 0 or X % 518 == 0 or X % 519 == 0 or X % 520 == 0 or X % 521 == 0 or X % 522 == 0 or X % 523 == 0 or X % 524 == 0 or X % 525 == 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 or X % 616 == 0 or X % 617 == 0 or X % 618 == 0 or X % 619 == 0 or X % 620 == 0 or X % 621 == 0 or X % 622 == 0 or X % 623 == 0 or X % 624 == 0 or X % 625 == 0 or X % 626 == 0 or X % 627 == 0 or X % 628 == 0 or X % 629 == 0 or X % 630 == 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 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 int(e%1):
  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:
import sys
n = int(input())
t = n//615
ans = n%615
for h in range(t):
    ans=615*h
    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(str(i) + ' ' + str(j) + ' ' +str(k)+ ' ' + str(l) + ' '+ str(m) + ' ' + str(n))
                                print('1')
                                sys.exit()
                            elif ans < tmp:break
print('0')

Submission status: Wrong Answer

Solution code:
X = int(input())
Max = 1000
for i in range(Max):
  s1 = i * 100
  if s1 > X:
    continue
  for j in range(Max-i):
    s2 = s1 + j*101
    if X < s2:
      continue
    for k in range(Max-i-j):
      s3 = s2 + k*102
      if X < s3:
        continue
      for l in range(Max-i-j-k):
        s4 = s3 + l*103
        if X < s4:
          continue
        for m in range(Max-i-j-k-l):
          s5 = s4 + m*104
          if X < s5:
            continue
          for n in range(Max-i-j-k-l-m):
            s6 = s5 + n*105
            if X == s6:
              print(1)
print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())

n = -(-x//105)

if 105*n - 5*n <x or x%105 == 0:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
ketasuu = math.ceil(X/100)
nedan = [100,101,102,103,104,105]
ans = 0
for i in range(0,ketasuu):
    for o in range(0,ketasuu):
        for p in range(0,ketasuu):
            for a in range(0,ketasuu):
                for s in range(0,ketasuu):
                    for d in range(0,ketasuu):
                        if X == nedan[0]*i+nedan[1]*o+nedan[2]*p+nedan[3]*a+nedan[4]*s+nedan[5]*d:
                            ans += 1
                            break
if ans>=1:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())

import numpy as np


def judge(X):
	maxrange = min(int(X/100)+1, 1000000)
	for a in range(maxrange):
		for b in range(maxrange):
			for c in range(maxrange):
				for d in range(maxrange):
					S = 100 * a + 101 * b + 102 * c + 103 * d
					for i in range(10):
						e = np.arange(int(maxrange/10)*i, int(maxrange/10)*(i+1), dtype="uint32")
						f = np.arange(int(maxrange/10)*i, int(maxrange/10)*(i+1), dtype="uint32")
						EF = np.meshgrid(e, f)
						Splus = 104 * EF[0] + 105 * EF[1]
						if np.any(Splus == X - S) == True:
							return 1
						else:
							continue
	return 0

print(judge(X))

Submission status: Wrong Answer

Solution code:
X = int(input())
x1 = int(X/100)
x2 = int(X/105)
if x1 != x2:
    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] * 7 for i in range(1001)]
for i in range(1000):
    for j in range(6):
            sum_list[i + 1][j + 1] = sum_list[i][j + 1] + sum_list[i + 1][j] - sum_list[i][j] + pre_list[i][j]

flag = 0
for i1 in range(0, 1000):
    for i2 in range(i1+1, 1001):
        for j1 in range(0, 6):
            for j2 in range(j1+1, 7):
                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())
flag=False

if X>=2100:
  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:
                if flag==False:
                  print(1)
                  flag=True
                  break
              
if flag==False:
  print(0)

Submission status: Wrong Answer

Solution code:
def bag(x):
  max_num = x // 100
  print(int(max_num * 5 <= x % 100))
 
if __name__ == "__main__":
  import sys
  in_str = ''
  for line in sys.stdin:
    in_str += line
  n = [int(_) for _ in in_str.split()][0]
  bag(n)

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 < 0:
                            print(0)
                            sys.exit()
                        else:
                            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()

Submission status: Wrong Answer

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

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


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

    if x == 0:
        if c == lim:
            print(1)
            exit()
        else:
            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())
'''
x1 = x//100
x2 = x - x1*100
n = 0
#print(x1)
#print(x2)

n = x2//5

#print(n)
if n+x2-5*n < x1:
    print(1)
else:
    print(0)
'''

n = -(-x//105)

if 105*n - 5*n <x:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
x=int(input())

L=[100,101,102,103,104,105]
a=x//100

if a*105<x<a*105+99:
    print(0)
    exit()

print(1)

Submission status: Wrong Answer

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

if X>=1995:
  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:
                if flag==False:
                  print(1)
                  flag=True
                  break
              
if flag==False:
  print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())

err = 0

if X >= 2000:
    print("1")
else:
    for i in range(20):
        n = i + 1
        if X>= 100*n and X<= 100*n+5*n:
            print("1")
            err = 1
            break
if err == 0:
    print("0")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
r = n
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
if pay<left:
	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 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 int(e%1):
  f = a%1
  count += int(e/1)
if m/100 == count:
  print("1")
else:
  print("0")

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()
if n%100==0:
  print(1)
  exit()
  
item=n//100
money = n-item*100

if item <10 and money < 10:
  print(1)
  exit()
while money<item:
  item -=1
  money = n-item*100

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

Submission status: Wrong Answer

Solution code:
X = int(input())
x1 = int(X//100)
x2 = int(X//105)
if x1 != x2:
    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//4)

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

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

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

                        if y_a == 0:
                            return(1)


    return(0)

print(calc(X))

Submission status: Wrong Answer

Solution code:
import itertools

x = int(input())

if x < 100:
    print("0")
else:
    n = x // 100
    r = x % 100
    # print(n, r)

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

    for balls in itertools.combinations_with_replacement(nums, n):
        print(balls)
        if sum(balls) == r:
            print('1')
            break
    else:
        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))

if tail > 5*head*(10**(l-3)):
	print(0)
else :
	print(1)

Submission status: Wrong Answer

Solution code:
x = input()
ans = 0
if int(x) < 100:
    ans = 0
else:
    n = int(x[0]) * 5
    k = int(x[1:3])
    if k <= n:
        ans = 1
    else:
        ans = 0

print(ans)

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:
                if flag==False:
                  print(1)
                  flag=True
                  break
              
if flag==False:
  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(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 < 0:
                            print(0)
                            sys.exit()
                        else:
                            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()

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 or X % 210:
    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 or X % 313 == 0 or X % 314 == 0 or X % 315 == 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 or X % 415 == 0 or X % 416 == 0 or X % 417 == 0 or X % 418 == 0 or X % 419 == 0 or X % 420 == 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 or X % 516 == 0 or X % 517 == 0 or X % 518 == 0 or X % 519 == 0 or X % 520 == 0 or X % 521 == 0 or X % 522 == 0 or X % 523 == 0 or X % 524 == 0 or X % 525 == 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 or X % 616 == 0 or X % 617 == 0 or X % 618 == 0 or X % 619 == 0 or X % 620 == 0 or X % 621 == 0 or X % 622 == 0 or X % 623 == 0 or X % 624 == 0 or X % 625 == 0 or X % 626 == 0 or X % 627 == 0 or X % 628 == 0 or X % 629 == 0 or X % 630 == 0:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

def main():
    X = int(input())
    choices = [0,1,2,3,4,5]

    if X < 100:
        print(0)
        return
    
    amount = math.floor(X/100)
    amari = X%100

    result = 0

    for chosen_list in itertools.permutations(choices, r=amount):
        if amari == sum(chosen_list):
            result = 1
            break
    
    print(result)


if __name__ == "__main__":
    main()

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:
        if num == 0:
            break
        for _ in range(num//a):
            res_list.append(a)

        num = num % a

        if 1<= 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:
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))
	if floor(xmax) == xmax:
		return(":(")
	else:
		if floor(xmin) == floor(xmax):
			return(":(")
		if floor(xmin) < floor(xmax):
			return(floor(xmax))

print(doit(N))

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 and n <= 26:
    print(1)
elif X >= 2626:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x = int(input())

p = 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")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if e < mc:
    for i in range(1,5):
        while cnt < mc:
            cnt += e // i
            e = e % i
            if e == 0:
                f = 1
                break
            i += 1

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

Submission status: Wrong Answer

Solution code:
x = int(input())
d3 = 0
d21 = 0
if x >99:
    d3 = int(str(x)[-3])
    d21 = int(str(x)[-2::])


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

elif x < 2000:
    if (d3*105)%100 < d21:
        print(0)
    else:
        print(1)

else:
    print(1)