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())
total = 0
if x % 10 == 9:
        total += 104 + 105
elif x % 10 == 8:
        total += 104 + 104
elif x % 10 == 7:
        total += 103 + 104
elif x % 10 == 6:
        total += 105 + 101
elif x % 10 == 5:
        total += 105
elif x % 10 == 4:
        total += 104
elif x % 10 == 3:
        total += 103
elif x % 10 == 2:
        total += 102
elif x % 10 == 1:
        total += 101

if x % 100 // 10 == 1:
        total += 105 + 105
elif x % 100 // 10 == 2:
        total += 105 * 4
elif x % 100 // 10 == 3:
        total += 105 * 6
elif x % 100 // 10 == 4:
        total += 105 * 8
elif x % 100 // 10 == 5:
        total += 105 * 10
elif x % 100 // 10 == 6:
        total += 105 * 12
elif x % 100 // 10 == 7:
        total += 105 * 14
elif x % 100 // 10 == 8:
        total += 105 * 16
elif x % 100 // 10 == 9:
        total += 105 * 18

print(total)
if total <= x:
        print(1)

Submission status: Wrong Answer

Solution code:
x = int(input())
while(x>0):
    if x%100==0:
        print("1")
        break
    elif x<100:
        print("0")
        break
    elif x%100>=5:
        x -= 105
        continue
    else:
        x-=(x%100)+100
        continue

Submission status: Wrong Answer

Solution code:
from itertools import combinations_with_replacement

X = list(input())
tmp = X
num = int("".join(tmp))

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

X.pop()
X.pop()
X = int("".join(X))

food = [100, 101, 102, 103, 104, 105, 106]

for i in combinations_with_replacement(food, X):
    if sum(i) == num:
        print(1)
        exit()

print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
x = int(input())
n = x // 100
k = x % 100
t = k // 5
if t > n:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
a=0
b=0
c=0
d=0
e=0
f=0
x=int(input())
check=0
while x>=100:
    k=x%100
    v=x%5
    if v==0 and k==0:
        a+=x//100
        break
    elif v==1:
        b+=1
        x-=101
    elif v==2:
        c+=1
        x-=102
    elif v==3:
        d+=1
        x-=103
    elif v==4:
        e+=1
        x-=104
    else:
        f+=1
        x-=105
if x==0 and max(a,b,c,d,e,f)<=1000000:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False
input = sys.stdin.readline
Xs = input()
X = int(Xs)
X_ = int(Xs[-2:])
if X < 100:
  print("0")
  exit()
if X_ == 0 or X_ == 1 or X_ == 2 or X_ == 3 or X_ == 4 or X_ == 5:
  print("1")
  exit()
count = 0
count += X_ // 5
X_ = X_ %  5
count += X_ //4
X_=X_%4
count += X_ //3
X_=X_%3
count += X_ //2
X_=X_%2
count += X_ //1
X_=X_%1
if X - (count * 100) >= 100 and str(X)[-2:] == "00":
  print("1")
else:
  print("0")
if em: sys.stdin = open('/dev/tty')

Submission status: Wrong Answer

Solution code:
_N = 1000000
N = int(input())

flag = True
end = False

for i in [100, 101, 102, 103, 104, 105]:
    if end == True:
        break
    xx = N//i
    x = N%i
    for j in [100, 101, 102, 103, 104, 105]:
        y = x%j
        if y == 0 and xx <= _N :
            flag = False
            end = True
            print(1)
            break
if flag:
    print(0)

Submission status: Wrong Answer

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

    print(0)

Submission status: Wrong Answer

Solution code:
X=int(input())

if X%102<=3*X//102:
    print(1)
elif 102-X%102<=2*X//102:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

num = 0
for i in range(5, 0, -1):
    q, mod = divmod(X2, i)
    num += q
    if mod == 0: break
    
if X >= num*100: print(1)
else: print(0)

Submission status: Wrong Answer

Solution code:
X=int(input())

h_num=int(X/100)
x_s=int(X%100)

ans=int(x_s/5)+1

if ans<=h_num:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
x=int(input())
memo=[0]*100001

for i in range(1,1000):
  temp=[1]*6*i
  memo[100*i:105*i+1]=temp
memo[100000]=1

print(memo[x])

Submission status: Wrong Answer

Solution code:
'''
　 ∧_,,∧    究極奥義「WAがACになーれ！！」
　（`・ω・)つ━☆・*。
　⊂　　 ノ 　　　・゜+.
　 し’´Ｊ　　*・ 
'''
import sys
input = sys.stdin.readline
x=int(input())
x%=100000
for a in range(10):
    for b in range(10):
        for c in range(10):
            for d in range(10):
                for e in range(10):
                    for f in range(10):
                        if 100*a+101*b+102*c+103*d+104*e+105*f==x:
                            print(1)
                            exit()
print(0)

Submission status: Wrong Answer

Solution code:
import sys
x = int(input())
if x < 100:
	print(0)
	sys.exit()
if x > 50000:
	print(1)
	sys.exit()
for i in range(50):
	for j in range(50-i):
		for k in range(50-i-j):
			for l in range(50-i-j-k):
				for m in range(50-i-j-k-l):
					if x - (100*i+101*j+102*k+103*l+104*m) % 105 == 0:
						print(1)
						sys.exit()
print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

i1 = math.floor(X/100)
i2 = math.floor(X/101)
i3 = math.floor(X/102)
i4 = math.floor(X/103)
i5 = math.floor(X/104)
i6 = math.floor(X/105)

for i in range(i1):
  for j in range(i2):
    for k in range(i3):
      for l in range(i4):
        for m in range(i5):
          for n in range(i6):
            if X==100*i + 101*j + 102*k +103*l +104*m +105*n:
              print(1)
              exit()
print(0)

Submission status: Wrong Answer

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

num = 0
for i in range(5, 0, -1):
    q, mod = divmod(X2, i)
    num += q
    if mod == 0: break
    
if X > num*100: print(1)
else: print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

nokori = x%100
max_n = x//100
print(nokori//5 + nokori%5//4 + nokori%5%4//3 + nokori%5%4%3//2 + nokori%5%4%3%2)
if max_n < nokori//5 + nokori%5//4 + nokori%5%4//3 + nokori%5%4%3//2 + nokori%5%4%3%2:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
def solve(integer_list, target_sum,  i=0, sum=0):
    if i == len(integer_list):
        return sum == target_sum
    if (solve(integer_list, target_sum, i + 1, sum)):
        return True
    if (solve(integer_list, target_sum, i + 1, sum + integer_list[i])):
        return True
    return False

integer_list = [1, 2, 3, 4, 5]
target_sum = int(input()) % 100

if solve(integer_list, target_sum):
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())
if X < 100:
    print(0)
else:
    for i in range(1, 10**3+10):
        if X-100*i < 0 or X-100*i > 5*i:
            continue
        else:
            print(1)
            sys.exit()
print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
if x % 100 == 0:
    print(1)
    exit()
    
if x >= 2099:
    print(1)
    exit()

num = x // 100
diff = x % 100

for i in range(num):
    for j in range(num-i):
        for k in range(num-i-j):
            for l in range(num-i-j-k):
                for m in range(num-i-j-k-l):
                    ans = 1*i + 2*j + 3*k + 4*l + 5*m
                    if ans == diff:
                        print(1)
                        exit()

print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

#初期化
N=len(a)
dp=[[0 for i in range(A+1)] for j in range(N+1)]
dp[0][0]=1

#DP
for i in range(N):
  for j in range(A+1):
    if a[i]<=j: 
      dp[i+1][j]=dp[i][j-a[i]] or dp[i][j]
    else: 
      dp[i+1][j]=dp[i][j]
print(dp[N][A])

Submission status: Wrong Answer

Solution code:
x=int(input())
memo=[0]*100001

for i in range(1,999):
  temp=[1]*6*i
  memo[100*i:105*i+1]=temp
memo[100000]=1

print(memo[x])

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 math
import queue
import bisect
import heapq
import time
import itertools

mod = 1e9+7

def swap(a,b):
    return (b,a)

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def main():
    x = int(input())
    if x<100:
        print(0)
    buy = x//100
    sur = x%100
    num = 0
    for i in range(5,0,-1):
        num += sur//i
        sur %= i
    if num<=buy:
        print(1)
    else:
        print(0)
    return

if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())
if x < 100:
    if x == 0:
        print(1)
    else:
        print(0)
    import sys
    sys.exit()
        
have = x // 100
need = x % 100
if need != 0 :
    have += 1

dp = [ -1 for i in range(100) ]
dp[0] = 0
dp[1] = 1
dp[2] = 1
dp[3] = 1
dp[4] = 1
dp[5] = 1
for j in range(6,100):
    dp[j] = 10**9
    for i in [1,2,3,4,5]:
        dp[j] = min( dp[j], dp[j-i] + 1 )

if dp[need] <= have:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l=[105,101,102,103,104]
a=0
b=0
c=0
d=0
e=0
f=0
x=int(input())
t=0
check=0
while x>=100:
    k=x%100
    v=x%5
    x-=l[v]
    if v==0 and k==0:
        a+=x//100
        break
    elif v==1:
        b+=1
        x-=101
    elif v==2:
        c+=1
        x-=102
    elif v==3:
        d+=1
        x-=103
    elif v==4:
        e+=1
        x-=104
    else:
        f+=1
        x-=105
if x==0 and max(a,b,c,d,e,f)<=1000000:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

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

n = int(x/100)

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

Submission status: Wrong Answer

Solution code:
N = int(input())

flag = True
end = False

for i in [100, 101, 102, 103, 104, 105]:
    if end == True:
        break
    x = N%i
    for j in [100, 101, 102, 103, 104, 105]:
        y = x%j
        if y == 0:
            flag = False
            end = True
            print(1)
            break
if flag:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())
if X < 100:
    print(0)
else:
    for i in range(1, 10**3+10):
        if X-100*i < i or X-100*i > 5*i:
            continue
        else:
            print(1)
            sys.exit()
print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
# 最低保証回数
Nmax = X//100
# 必ず0がたされるので、先に引いておいてやる
X -= 100*Nmax

import numpy as np 
x = np.ceil(X/5)
# print(Nmax, x)
if Nmax <= x:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

maxi = n // 100 +1
for i in range(maxi):
    if 100 * i == n:
        print(1)
        exit()
    for j in range(1, maxi -1):
        if 100*i+101*j == n:
            print(1)
            exit()
        for k in range(1, maxi-(i+j)):
            if 100*i+101*j+102*k == n:
                print(1)
                exit()
            for l in range(1, maxi-(i+j+k)):
                if 100*i+101*j+102*k+103*l == n:
                    print(1)
                    exit()
                for m in range(1, maxi-(i+j+k+l)):
                    if 100*i+101*j+102*k+103*l+104*m == n:
                        print(1)
                        exit()
                    for o in range(1, maxi-(i+j+k+l+m)):
                        if 100*i+101*j+102*k+103*l+104*m+105*o == n:
                            print(1)
                            exit()
print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
a = X // 100        ##1 <= a <= 1000
X_down = X - 100 * a - 5 * a 
if X_down >= 0:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
X = int(input())

c = X % 100
d = X // 100

a5 = c // 5
if d < a5 + 1:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
x = int(input())
for i in range(5, 0, -1):
    x -= (100 + i) * ((x % 100) // i)
    print(x)
    if x < 0:
        print(0)
        exit()
if x % 100:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
X=int(input())

temp=-(-X//105)
hiku=temp*105-X

print(temp*5)
print(hiku)

if temp*5>=hiku:
	print(1)
else:
	print(0)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=n//100
a=0
for i in range(k+1):
    if i<=n-i*100<=5*i:
        a=1
        break
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())

buy_count = (x//105) + 1
over_cost = 105 - x%105
can_buy = False
while buy_count>=0:
    if over_cost == 105:
        can_buy = True
        break
    if over_cost >= 4:
        over_cost -= 4
        buy_count -= 1
    elif over_cost >= 3:
        over_cost -= 3
        buy_count -= 1
    elif over_cost >= 2:
        over_cost -= 2
        buy_count -= 1
    elif over_cost >= 1:
        over_cost -= 1
        buy_count -= 1
    elif over_cost == 0:
        can_buy = True
        break
        
if can_buy:
    print('1')
else:
    print('0')

Submission status: Wrong Answer

Solution code:
def resolve():
    x = int(input())
    q = x // 100
    r = x % 100
    if r == 0 :
        print("1")
        return None
    if q < (r//5)+1:
        print("0")
    else:
        print("1")
resolve()

Submission status: Wrong Answer

Solution code:
x = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())

if x>=2000:
    print("1")
elif ((x%100)+4)/5 > x/100:
    print("0")
else:
    print("1")

Submission status: Wrong Answer

Solution code:
x = int(input())
for i in range(x//105,x//105+3):
    ans = x - i * 100
    if ans >= 0 and ans <= 5 * i:
        print("1")
    else:
        print("0")

Submission status: Wrong Answer

Solution code:
x = int(input())

imin = int(x/105)
imax = int(x/100)

if imin <= int(x%100) <=imax*5:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
n = int(input())
x = str(n)
count = 0

if len(x)<=2:
    print(0)#impossible

else:
    num = int(x[-2]+x[-1])#しも２けた
    pot = (n-num)/100
    while(True):
        if num>6:
            num-=6
            count+=1
        else:
            count+=1
            break
    if count<=pot:
        print(1)
    else:
        print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
x=int(input())
l=math.ceil(x/105)
r=math.floor(x/100)
#print(l,r)
if l==r:
    print(1)
else:
    if x % 2100 == 0:
        print(1)
    else:
        print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
a = X // 100
b = X // 105
if a != b:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import itertools
l = [1,2,3,4,5,6,7]
X = int(input())

flag = False
for c  in itertools.combinations_with_replacement(l, X//100):
  if sum(c) == X - 100*(X//100):
    print(1)
    flag = True
    break
    
if not flag:
  print(0)

Submission status: Wrong Answer

Solution code:
import sys

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

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

if t2 != 0:
    ans = 0

print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    x = int(input())
    hund = x//100
    ans = 0
    a = x-hund*100
    als = [0,1,2,3,4]
    if a <= hund*5:
        while hund > 0:
            if a >= 5:
                a -= 5
                hund -= 1
            elif a in als:
                ans = 1
                break 
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
X=int(input())
last_2_digits=X%100
num=X//100
flag=False
for b in range(last_2_digits+1):
  for c in range(last_2_digits+1-b):
    for d in range(last_2_digits+1-b-2*c):
      for e in range(last_2_digits+1-b-2*c-3*d):
        if (last_2_digits+1-b-2*c-3*d-4*e)%5==0:
          f=(last_2_digits+1-b-2*c-3*d-4*e)//5
          if b+c+d+e+f<=num:
            flag=True
        if flag:
          break
      if flag:
        break
    if flag:
      break
  if flag:
    break
if flag:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
x=int(input())
def ans():
  if x<100:
    print(0)
    return
  s=str(x)
  sl=len(s)
  m=int(s[sl-2]) #十の位
  n=int(s[sl-1]) #一の位
  sum=0
  sum+=105*((m*10)/5) #105円を複数買って十の位満たす
  while n>0:
    if n>=4:#104円を買う
      sum+=104
      n-=4
    else:#101,2,3円を買う
      sum+=100+n
      n-=n
  if x-sum>=0:#残りで100円を買う
    print(1)
    return
  print(0)
ans()

Submission status: Wrong Answer

Solution code:
X = int(input())
kosu = int(X / 100)
mod = X % 100


if (mod / 5) < kosu:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby

x = int(stdin.readline().rstrip())
num = x / 100
data = x % 100
if x < 100:
    print(0)
elif data > num * 5:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

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

q, mod = divmod(X, 100)

q2, mod2 = divmod(mod, 5)

if q2+1 <= q:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
import math

x = int(input())
# 1999 is false
if x > 1999:
  print('1')
if x < 100:
  print('0')

upper, under = divmod(x, 100)
if under == 0:
  print('1')

if upper > (under - 1) // 5:
  print('1')
else:
  print('0')

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)
INF = 10**30

def main():
    n = int(input().strip())
    a = (n % 100) // 10
    b = (n % 10)
    # if a == b == 0:
    #     print(1)
    #     return
    if b == 0:
        k = 0
    elif 1 <= b <= 5:
        k = 1
    else:
        k = 2
    s = a * 2 + k
    # print(s, a, b)
    if s <= (n % 1000) / 100:
        print(1)
    else:
        print(0)



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

availableBuyCount = n // 100
surplus = n % 100

if availableBuyCount < (surplus // 5):
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
x = int(input())
have = x // 100
need = x % 100
if need != 0 :
    have += 1

# Can need < 100 be formed from 0,1,2,3,4,5 using upto have choices
dp = [ -1 for i in range(100) ]
dp[0] = 0
dp[1] = 1
dp[2] = 1
dp[3] = 1
dp[4] = 1
dp[5] = 1
for j in range(6,100):
    dp[j] = 10**9
    for i in [1,2,3,4,5]:
        dp[j] = min( dp[j], dp[j-i] + 1 )

if dp[need] <= have:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())

buy_count = (x//105) + 1
over_cost = 105 - x%105
can_buy = False
while buy_count>=0:
    if over_cost >= 4:
        over_cost -= 4
        buy_count -= 1
    elif over_cost >= 3:
        over_cost -= 3
        buy_count -= 1
    elif over_cost >= 2:
        over_cost -= 2
        buy_count -= 1
    elif over_cost >= 1:
        over_cost -= 1
        buy_count -= 1
    elif over_cost == 0:
        can_buy = True
        break
        
if can_buy:
    print('1')
else:
    print('0')

Submission status: Wrong Answer

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

a=X//100
b=X%100

for i in range(0,a+1):
  for j in range(0,a-i):
    for k in range(0,a-i-j):
      for l in range(0,a-i-j-k):
        for m in range(0,a-i-j-k-l):
          if i+2*j+3*k+4*l+5*m == b:
            #print(i,j,k,l,m)
            print(1)
            flag=True
            break
            
if flag==False:
  print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    if X < 100:
        print(0)
    elif X == 100000:
        print(1)

    n = X // 100
    sum = X % 100

    for a in range(n + 1):
        for b in range(n + 1 - a):
            for c in range(n + 1 - a - b):
                for d in range(n + 1 - a - b - c):
                    for e in range(n + 1 - a - b - c - d):
                        f = n - a - b - c - d - e
                        tmp = (b * 1) + (c * 2) + (d * 3) + (e * 4) + (f * 5)
                        if tmp == sum:
                            # print(a, b, c, d, e, f)
                            print(1)
                            exit()


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def resolve():
    x = int(input())
    q = x // 100
    r = x % 100
    if r != 0 and q < (r//5)+1:
        print("0")
    else:
        print("1")
resolve()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	X = inputInt()

	tmp = X % 100
	kai = X // 100

	tmptmp = -(-tmp // 5)

	if tmptmp < kai:
		print(1)
	else:
		print(0)

	#print(tmptmp)
	#print(kai)



if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
X=int(input())

N=X//105 +1
a=N*105 -X

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

num = x // 100
diff = x % 100

for i in range(num):
    for j in range(num-i):
        for k in range(num-i-j):
            for l in range(num-i-j-k):
                for m in range(num-i-j-k-l):
                    ans = 1*i + 2*j + 3*k + 4*l + 5*m
                    if ans == diff:
                        print(1)
                        exit()

print(0)

Submission status: Wrong Answer

Solution code:
x = int(input())
times = x/100
amount = x%100
if amount <= times*5 and x>=100  or x>=2000:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())
x = str(n)
count = 0

if len(x)<=2:
    print(0)#impossible

else:
    num = int(x[-2]+x[-1])#しも２けた
    pot = (n-num)/100
    while(True):
        if num>=6:
            num-=6
            count+=1
        else:
            count+=1
            break
    if count<=pot:
        print(1)
    else:
        print(0)

Submission status: Wrong Answer

Solution code:
def solve(integer_list, target_sum,  i=0, sum=0):
    if i == len(integer_list):
        return sum == target_sum
    if (solve(integer_list, target_sum, i + 1, sum)):
        return True
    if (solve(integer_list, target_sum, i + 1, sum + integer_list[i])):
        return True
    return False

integer_list = [100, 101, 102, 103,104, 105]
target_sum = int(input())

if solve(integer_list, target_sum):
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
t = X // 100
s = X % 100
if t >= (s*5):
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = 1e9

def main():
    x = int(input())
    if x<100:
        print(0)
    buy = x//100
    sur = x%100
    num = 0
    while sur>0:
        for i in range(5,0,-1):
            num += sur//i
            sur %= i
    if num<buy:
        print(1)
    else:
        print(0)
    return

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
for i in range(1, 100001):
	if i*(615) == n:
		c = i
		break
	elif i*615 < n:
		c = i
	else:
		break
try:
	print(c)
except:
	print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 1
ng_list = [(-1,100)] + [ (105*i, 100*(i+1)) for i in range(1,20) ]
print(ng_list)
for a, b in ng_list:
    if a < n < b:
        ans = 0
        break
print(ans)

Submission status: Wrong Answer

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

syou = X/100

amari = X % 100


# 商の数
if amari <= syou * 5:
    print('1')
else:
    print('0')

Submission status: Wrong Answer

Solution code:
X = int(input())
t = X // 100
s = X % 100
print(t)
if t >= (s*5):
  print("1")
else:
  print("0")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
import sys
if X < 100:
    print(0)
else:
    for i in range(10**3):
        if X-100*i < i or X-100*i > 5*i:
            continue
        else:
            print(1)
            sys.exit()
print(0)

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(1,x//100+1):
    m=x-(i*100)
    if m<i*5:
        print(1)
        exit()
print(0)

Submission status: Wrong Answer

Solution code:
X = int(input())
able = []
for i in range(100,105+1):
    able.append(i)
for i in range(200,210+1):
    able.append(i)
for i in range(300,315+1):
    able.append(i)
for i in range(400,420+1):
    able.append(i)
for i in range(500,525+1):
    able.append(i)
if X >= 615:
    print(1)
    exit()
if X in able:
        print(1)
        exit()
print(0)

Submission status: Wrong Answer

Solution code:
import math
def resolve():
    x = int(input())
    q = x // 100
    r = x % 100
    if q < (r//5)+1:
        print("0")
    else:
        print("1")
resolve()

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 1
ng_list = [ (105*i, 100*(i+1)) for i in range(1,20) ]
print(ng_list)
for a, b in ng_list:
    if a < n < b:
        ans = 0
        break
print(ans)