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: Runtime Error

Solution code:
import sys
x = input()
x1 = list(x)
h = len(x)
x = int(x)

if x>2000:
  print('1')
  sys.exit()

a1 = int(x1[h-1])
a2 = int(x1[h-2])

if 1<=a1<=5:
  c1 = 1
elif:
  c1 = 0
else:
  c1 = 2

c2 = a2*2
if int(x1[0])+int(x1[1]) < c1+c2:
  print('0')
else:
  print('1')

Submission status: Runtime Error

Solution code:
import sys
x = input()
x1 = list(x)
h = len(x)
x = int(x)

if x>2000:
  print('1')
  sys.exit()

a1 = int(x1[h-1])
a2 = int(x1[h-2])

if a1<=5:
  c1 = 1
else:
  c1 = 2

c2 = a2*2
if int(x1[0])+int(x1[1]) < c1+c2:
  print('0')
else:
  print('1')

Submission status: Runtime Error

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    s=input()
    n=s[0]
    if int(s)<100:print(0)
    if int(s[1:3])<=int(n)*5:print(1)
    else:print(0)

if __name__=='__main__':
    main()

Submission status: Runtime Error

Solution code:
dp = {100: 1, 101: 1, 102: 1, 103: 1, 104: 1, 105: 1}
l = [100, 101, 102, 103, 104, 105]
for i in range(100001):
  if i == 0:
    dp[0] = 1
  elif i < 100:
    dp[i] = 0
  elif i >= 106:
    for cost in l:
      dp[i] += dp[i-cost]

n = int(input())
if dp[n] >= 1:
  print(1)
else:
  print(0)

Submission status: Runtime Error

Solution code:
x = int(input())

dp = [0 for _ in range(x + 1)] #0:"No", 1:"Yes"
dp[0] = 1
if x < 100:
    print(dp[x])
    exit()
for i in range(100, 106):
    dp[i] = 1
for i in range(106, x + 1):
    if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
        dp[i] = 1
print(dp[x])

Submission status: Runtime Error

Solution code:
x = int(input())

dp = [0 for _ in range(x + 1)] #0:"No", 1:"Yes"
dp[0] = 1
for i in range(100, 106):
    dp[i] = 1
for i in range(106, x + 1):
    if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
        dp[i] = 1
print(dp[x])

Submission status: Runtime Error

Solution code:
X = int(input())
flag = 0
for c in range(X):
  if 100*C <= X and 105*C >= X:
    flag += 1
print(flag)

Submission status: Runtime Error

Solution code:
x = int(input())

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

Submission status: Runtime Error

Solution code:
x = int(input())
tmp = x%100

if x % tmp == 0:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
X = int(input())
dp = [False] * (X+100)
for i in range(6):
    dp[100+i] = True
for i in range(X+10):
    for k in range(6):
        if i - 100 - k > 0:
            dp[i] = dp[i] or dp[i-100-k]
print(1 if dp[X] else 0)

Submission status: Runtime Error

Solution code:
X = int(input())
dp = [False] * (X+100)
for i in range(6):
    dp[100+i] = True
for i in range(107, X+10):
    for k in range(6):
        dp[i] = dp[i] or dp[i-100-k]
print(1 if dp[X] else 0)

Submission status: Runtime Error

Solution code:
X = int(input())
dp = [False] * (X+100)
for i in range(6):
    dp[100+i] = True
for i in range(107, X+100):
    for k in range(6):
        dp[i] = dp[i] or dp[i-100-k]
print(1 if dp[X] else 0)

Submission status: Runtime Error

Solution code:
num=int(input())
if num%100*21 <= n:
    print(1)
else:
    print(0)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
 
ans = 0
for i in range(1, n+1):
  if n in list(range(100 * i, 105 * i + 1))
    ans = 1
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

ans = 0
for i in range(1, n+1):
  for x in range(100 * x, 105 * x + 1):
    if n == x:
      ans = 1
print(ans)

Submission status: Runtime Error

Solution code:
X=int(input())
N=X//100
M=X%100
A=[0,1,2,3,4,5]
dp=[[0]*(M+1) for i in range(N+1)]
dp[0][0]=1
for i in range(N):
    for k in range(M+1):
        dp[i+1][k]|=dp[i][k]
        if k>=A[i]:
            dp[i+1][k]|=dp[i][k-A[i]]
print(dp[N][M])

Submission status: Runtime Error

Solution code:
def solve(X):
    for a in range(1 + X // 100):
        for b in range(1 + X // 101):
            for c in range(1+ X // 102):
                for d in range(1 + X // 103):
                    for e in range(1 + X // 104):
                        for f in range( 1 + X // 105):
                            if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 == X:
                                return 1
                            elif a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
                                break
                #        if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
                 #           break
              #      if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
               #         break
            #    if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
             #       break
          #  if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
           #     break
        #if a*100 + b*101+ c*102 + d * 103 + e * 104 + f * 105 > X:
         #   break
    return 0

X = int(input())
print(solve(X))
~

Submission status: Runtime Error

Solution code:
def main():
    target = int(input())
    cost = [101, 102, 103, 104, 105]
    answer = False
    for i in range(32):
        choice = bin(i)[2:].zfill(5)
        result = 0
        for j in range(5):
            result += cost[j] * int(choice[j])
        if (result % 100) % (target % 100) == 0 and result <= target:
            answer = True
            break
    print(1 if answer else 0)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
X = list(input())
con = X[len(X)-2:len(X)]
kak = X[0:len(X)-2]
kak = int("".join(kak))
con = int("".join(con))
if con>=5:
    imp1 = con//5
    imp2 = con%5
else:
    imp1 = 1
    imp2 = 0
#print(kak, imp1, imp2)
if kak>=imp1+imp2:
    print(1)
else:
    print(0)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(imput())
r=N%100
d=int((N-r)/100)

if r>5*d:
  print(0)
else:
  primt(1)

Submission status: Runtime Error

Solution code:
n=int(input())
dp=[0]*(n+1)
dp[0]=1
for i in range(n+1):
  for j in range(100,106):
    dp[i]=max(dp[i],dp[i-j])
if dp[n]==1:
  print(1)
else:
  print(0)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define rep(i,n) for(int i=0;i<n;i++)

const ll mod = 1e9;
const int INF = 1<<29;

int main(){
    int x;
    cin >> x;
    if (x < 100) cout << 0 << endl;
    else{
        int num = x / 100;
        x %= 100;
        for (int i=5;i>0;i--){
            num -= x / i;
            x %= i;
        }
        if (num >= 0) cout << 1 << endl;
        else cout << 0 << endl;
    }
    return 0;
}

Submission status: Runtime Error

Solution code:
import math

def solve():
    N = int(input())
    ABCDE = []
    for _ in range(5):
        ABCDE.append(int(input()))
        
    min_ = min(ABCDE)
    
    print(math.ceil(N/min_)+4)
    
solve()

Submission status: Runtime Error

Solution code:
x = int(input())
dp = [False] * (x + 1)
for i in range(100, 106):
    dp[i] = True
for i in range(106, x + 1):
    dp[i] = any(dp[i - j] for j in range(100, 106))
print(1 if dp[x] else 0)

Submission status: Runtime Error

Solution code:
x = int(input())
def solve1(x):
    for c in range(1, x+1):
        if 100*c <= x <= 105*c:
            print(1)
            exit()
    print(0)

def solve2(x):
    dp = [0 for _ in range(x+1)]
    for i in range(100, 106):
        dp[i] = 1

    for i in range(100, x+1):
        for j in range(6):
            if dp[i-(100+j)]:
                dp[i] = 1
    print(dp[-1])

solve2(x)

Submission status: Runtime Error

Solution code:
x=int(input())
if x<100:
  print(0)
  exit()
DP=[False]*(x+1)
for i in range(x+1):
  coin=list(range(100,106,1))
  if i in coin:
    DP[i]=True
    continue
  DP[i]=True if any(DP[i-m] for m in coin) else False
print(1 if DP[x]==True else 0)

Submission status: Runtime Error

Solution code:
x=int(input())
DP=[False]*(x+1)
for i in range(x+1):
  coin=list(range(100,106,1))
  if i in coin:
    DP[i]=True
    continue
  DP[i]=True if any(DP[i-m] for m in coin) else False
print(1 if DP[x]==True else 0)

Submission status: Runtime Error

Solution code:
import sys
import math
import numpy as np
import scipy as sp
input = sys.stdin.readline

X = input()
count = int(X[0])
num = int(X[1:])
for a in range(count):
    for b in range(count-a):
        for c in range(count-a-b):
            for d in range(count-a-b-c):
                for e in range(count-a-b-c-d):
                    for f in range(count-a-b-c-d-e):
                        li = [a,b,c,d,e,f]
                        arr = np.array(li)
                        tmp = 0
                        for i,l in enumerate(li):
                            tmp += l * i
                        if tmp == num:
                            print(1)
                            sys.exit()
print(0)

Submission status: Runtime Error

Solution code:
import sys
X = input()

if int(X) < 100:
    print(0)
    sys.exit(1)
    
tmp = int(X[-2] + X[-1])

iteration = 0

for i in range(5, 0, -1):
    iteration = tmp // i
    tmp %= i
    
    if tmp == 0:
        break

if (iteration * 100) >= int(X):
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
X = input()
tmp = int(X[-2] + X[-1])

iteration = 0

for i in range(5, 0, -1):
    iteration = tmp // i
    tmp %= i
    
    if tmp == 0:
        break

if (iteration * 100) >= int(X):
    print(1)
else:
    print(0)

Submission status: Runtime Error

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


DP = [0 for i in range(1000000)]
DP[0] = 1
a = [100, 101, 102, 103, 104, 105]
for i in a:
    for j in range(X):
        if DP[j] == 1:
            DP[j + i] = 1
print(DP[X])

Submission status: Runtime Error

Solution code:
X = int(input())
DP = [0 for i in range(100000)]
DP[0] = 1
a = [100, 101, 102, 103, 104, 105]
for i in a:
    for j in range(X):
        if DP[j] == 1:
            DP[j + i] = 1
print(DP[X])

Submission status: Runtime Error

Solution code:
price = int(input())
x = price // 100
y = price % 100
if y / x <= 5:
	val = 1
else:
  	val = 0
print(val)

Submission status: Runtime Error

Solution code:
X=int(input())
amount=X//100
Q=X%100
if Q//amount > 6:
  print(0)
else:
  print(1)

Submission status: Runtime Error

Solution code:
X=int(input())
amount=X//100
Q=X%100
if Q/amount > 6:
  print(0)
else:
  print(1)

Submission status: Runtime Error

Solution code:
X=int(input())
amount=X//100
Q=X%100
if Q/amount > 6:
  print(0)
else:
  print(1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
X = int(input())

n = math.floor(X/100)
remain = X % 100
print(n>= 1 && remain <= n*5)

Submission status: Runtime Error

Solution code:
X=int(input())
ldp=[0 for i in range(X+1)]
for i in range(100,106):
    ldp[i]=1
for i in range(106,X+1):
    if sum(ldp[i-105:i-99])>=1:
        ldp[i]=1
print(ldp[X])

Submission status: Runtime Error

Solution code:
X = int(input())

dp = [False for _ in range(100000)]
dp[0] = True

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

for i in range(X + 1):
    if dp[i]:
        for p in price:
            dp[i + p] = True

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

Submission status: Runtime Error

Solution code:
x = input()

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

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

print(0 if n>prefix else 1)

Submission status: Runtime Error

Solution code:
X = int(input())

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

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

Submission status: Runtime Error

Solution code:
X = int(input())

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

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

Submission status: Runtime Error

Solution code:
def is_eq(X):
    # 品数の個数をaとする
    a_list = range(1, 1000) 
    for a in a_list:
        if 100 * a <= x & x <= a * 105:
            return 1
        else:
            return 0
    
X = int(input())
print(is_eq(X))

Submission status: Runtime Error

Solution code:
def is_eq(X):
	x = int(X)
  	# 品数の個数をaとする
  	a_list = range(1, 1000) 
  	for a in a_list:
		if 100 * a <= x & x <= a * 105:
    		return 1
  		else:
    		return 0

if __name__ == __main__:
    is_eq(X)

Submission status: Runtime Error

Solution code:
x = int(input())

num = x // 100



dp = ["?"] * x
dp[0] = "Yes"

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

            
print(dp[x])

Submission status: Runtime Error

Solution code:
#config:utf-8
x = input()

if int(x) < 100:
    print(0)
    return
if 5 * int(x[0:-2]) >= int(x[-2:]):
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
#config:utf-8
x = input()

if x < 100:
    print(0)
    return
if 5 * int(x[0:-2]) >= int(x[-2:]):
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
#config:utf-8
x = input()

if 5 * int(x[0:-2]) >= int(x[-2:]):
    print(1)
else:
    print(0)

Submission status: Runtime Error

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

x = int(input())
while x > dp[-1]:
  maxv = dp[-1]
  next_max = 100000
  for v in dp:
    for p in prices:
      if v + p < next_max and v + p > maxv:
        next_max = v + p
 
if x = dp[-1]:
  print(1)
else:
  print(0)

Submission status: Runtime Error

Solution code:
XMAX = 10**5
X = int(input())
dp = [False] * XMAX
dp[0] = True

for i in range(0, X + 1):
    for p in range(100, 106):
        if i - p >= 0 and dp[i - p]:
            dp[i] = True
            next
if dp[X]:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
if X > 10100:
    print(1)
    quit()
lst = []
for i in range(20):
    lst.append([i*105+1, i*100+99])
for item in lst:
    if X >= item[0] and X<=item[1]:
        print(0)
        quit()
print(1)

Submission status: Runtime Error

Solution code:
X = int(input())

amari = X % 105

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

Submission status: Runtime Error

Solution code:
def main():
    # input
    x = int(input())

    dp = [False for _ in range(x+1)]
    for i in range(6):
        dp[100+i] = True

    # calc
    for i in range(106, x+1):
        for j in range(6):
            if dp[i-100-j]:
                dp[i] = True
                break

    if dp[i]:
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = int(input())

dp = [0] * (10**5+1)
dp[0] = 1

for i in range(x):
    if dp[i] == 1:
        dp[i+101] = 1
        dp[i+102] = 1
        dp[i+103] = 1
        dp[i+104] = 1
        dp[i+105] = 1

print(dp[x])

Submission status: Runtime Error

Solution code:
x = int(input())

dp = [0] * 10**5
dp[0] = 1

for i in range(x):
    if dp[i] == 1:
        dp[i+101] = 1
        dp[i+102] = 1
        dp[i+103] = 1
        dp[i+104] = 1
        dp[i+105] = 1
        dp[i+106] = 1

print(dp[x])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
X=int(input())

DP=[False]*(X+1)

for i in range(100,106):
    DP[i]=True

for i in range(106,X+1):
    if DP[i-100] or DP[i-101] or DP[i-102] or DP[i-103] or DP[i-104] or DP[i-105]:
        DP[i]=True

if DP[X]==True:
    print(1)
elif DP[X]==False:
    print(0)

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
count = 0
for i in range(1000):
    x= i%10
    z= i//100
    y= (i-x-(z*100))//10
    
    p=0
    for j in range(N):
        if S[j]!=str(z):
            p = p+1
        else:
          for k in range(p+1,N):
            if S[k]!=str(y):
                p = p+1
            else:
                for l in range(q+1,N):
                  if S[l]!=str(x):
                    p = p+1
                  else:
                    break
                
                
    if p<=N-2:
      count = count+1
    else:
      count = count
      
print(count)

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
count = 0
for i in range(1000):
    x= i%10
    z= i//100
    y= (i-x-(z*100))//10
    
    p=0
    for j in range(N):
        if S[j]!=str(z):
            p = p+1
        else:
          for k in range(p+1,N):
            if S[k]!=str(y):
                p = p+1
            else:
                for l in range(q+1,N):
                  if S[l]!=str(x):
                    p = p+1
                  else:
                    break
                
                
    if p<=N-2:
      count = count+1
    else:
      count = count

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
count = 0
for i in range(1000):
    x= i%10
    z= i//100
    y= (i-x-(z*100))//10
    
    p=0
    for j in range(N):
        if S[j]!=str(z):
            p = p+1
        else:
            break
    if p==N:
        count = count
        break
    else:
        q=p+1
        for k in range(p+1,N):
            if S[k]!=str(y):
                q = q+1
            else:
                break
        if q == N:
            count = count
            break
        else:
            r=q+1
            for l in range(q+1,N):
                if S[l]!=str(x):
                    r = r+1
                else:
                    break
            if r == N:
                count = count
            else:
                count = count+1
 
print(count)

Submission status: Runtime Error

Solution code:
X = int(input())
def check(n):
    if n == 0:  return 1
    elif (n < 100):    return 0
    else:
        flag = check(n-100) + check(n-101) + check(n-102) + check(n-103) + check(n-104) + check(n-105)
        if flag == 0:   return 0
        else:   return 1

print(check(X))

Submission status: Runtime Error

Solution code:
X = int(input())
mod = X % 100
q = int(X //100)
sum = 0
ans = 0
if q => 100:
    ans = 1
else:
    for i in range (0,q+1):
        for j in range (0,q+1-i):
            for k in range (0,q+1-i-j):
                for l in range (0,q+1-i-k-j):
                    for m in range (0,q+1-i-j-k-l):
                        sum = i+(2*j)+(3*k)+(4*l)+(5*m)
                        if sum == mod:
                            ans = 1
print(ans)

Submission status: Runtime Error

Solution code:
X = int(input())
mod = X % 100
q = int(X //100)
sum = 0
ans = 0
if q => 20:
    ans = 1
else:
    for i in range (0,q+1):
        for j in range (0,q+1-i):
            for k in range (0,q+1-i-j):
                for l in range (0,q+1-i-k-j):
                    for m in range (0,q+1-i-j-k-l):
                        sum = i+(2*j)+(3*k)+(4*l)+(5*m)
                        if sum == mod:
                            ans = 1
print(ans)

Submission status: Runtime Error

Solution code:
X = int(input())
x = x % 100
sum = 0
for i in range (0,100):
    for j in range (0,50):
        for k in range (0,34):
            for l in range (0,26):
                for m in range (0,20):
                    sum = i+(2*j)+(3*k)+(4*l)+(5*m)
if sum == x:
    print("1")
else:
    print("0")

Submission status: Runtime Error

Solution code:
X = int(input())

V = (100, 101, 102, 103, 104, 105)
#V = (3, 4, 8, 11)
Memo = [0] * (X+1)

if X < min(V):
    print (0)
    exit()

for i in range(len(V)):
    Memo[V[i]] = 1
    for j in range(1, X+1):
        if j - V[i] > 0:
            Memo[j] |= Memo[j-V[i]]

print (Memo[X])
#print (Memo)

Submission status: Runtime Error

Solution code:
X=int(input())
dp = [0]*(X+1)
dp[0]=1
dp[100]=1
dp[101]=1
dp[102]=1
dp[103]=1
dp[104]=1
dp[105]=1
if X>105:

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

Submission status: Runtime Error

Solution code:
X=int(input())
dp = [0]*(X+1)
dp[0]=1
dp[100]=1
dp[101]=1
dp[102]=1
dp[103]=1
dp[104]=1
dp[105]=1
for i in range(106,X+1):
	    if dp[i-100] == 1:
	    	    dp[i]=1
	    elif dp[i-101] == 1:
	    	    dp[i]=1
	    elif dp[i-102] == 1:
	    	    dp[i]=1
	    elif dp[i-103] == 1:
	    	    dp[i]=1
	    elif dp[i-104] == 1:
	    	    dp[i]=1
	    elif dp[i-105] == 1:
	    	    dp[i]=1
	    else:
	    	    dp[i]=0
	    
print(dp[X])

Submission status: Runtime Error

Solution code:
import queue
x=int(input())
avail=list(range(100,106))
ok=[False]*(x+1)
q=queue.Queue()
for i in avail:
    ok[i]=True
    q.put(i)
while not q.empty():
    f=q.get()
    for i in range(100,106):
        if(i+f<=x and not ok[i+f]):
            ok[i+f]=True
            q.put(i+f)
print(1 if ok[x] else 0)

Submission status: Runtime Error

Solution code:
import queue
x=int(input())
avail=list(range(100,106))
ok=[False]*(x+1)
q=queue.Queue()
for i in avail:
    ok[i]=True
    q.put(i)
while not q.empty():
    f=q.get()
    for i in range(100,106):
        if(i+f<=x and not ok[i+f]):
            ok[i+f]=True
            q.put(i+f)
print(1 if ok[i+f] else 0)

Submission status: Runtime Error

Solution code:
import queue
x=int(input())
avail=list(range(100,106))
q=queue.Queue()
ok=[False]*(x+1)
for i in avail:
    q.put(i)
    ok[i]=True
while not q.empty():
    f=q.get()
    for i in avail:
        if(i+f<=x and not ok[i+f]):
            avail.append(i+f)
            q.put(i+f)
            ok[i+f]=True
print(1 if x in avail else 0)

Submission status: Runtime Error

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

def dfs(price):
  if price > X:
    return 0
  ret = 1 if price == X else 0
  for pri in range(100, 106):
    ret += dfs(price+pri)
  return ret

if dfs(0) > 0:
  print(1)
else:
  print(0)

Submission status: Runtime Error

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

for a in range(1000001):
    for b in range(1000001):
        for c in range(1000001):
            for d in range(1000001):
                for e in range(1000001):
                    for f in range(1000001):
                        y =1 00*a +101*b + 102*c +103*d + 104*e + 105*f
                        if y == X:
                            print(1)
                        else:
                            print(0)

Submission status: Runtime Error

Solution code:
X = input().split()

for a in range(1000001):
    for b in range(1000001):
        for c in range(1000001):
            for d in range(1000001):
                for e in range(1000001):
                    for f in range(1000001):
                        y =1 00*a +101*b + 102*c +103*d + 104*e + 105*f
                        if y == X:
                            print(1)
                        else:
                            print(0)

Submission status: Runtime Error

Solution code:
X = input().split()
print(X)

for a in range(1000001):
 for b in range(1000001):
  for c in range(1000001):
   for d in range(1000001):
    for e in range(1000001):
     for f in range(1000001):
        y =1 00*a +101*b + 102*c +103*d + 104*e + 105*f
        if y == X:
             print(1)
        else:
            print(0)

Submission status: Runtime Error

Solution code:
X = int(input())
dp = [0 for i in range(X+1)]
if X <100:
    print(0)
else:
    for i in range(100,106):
        dp[i] =1
    for i in range(1,X+1):
        if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
            dp[i] = 1
    print(dp[-1])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x=int(input())
dp=[0]*(x+1)
dp[0]=1
for i in range(1,x+1):
  if i-100>=0 and dp[i-100]==1 or dp[i-101]==1 or dp[i-102]==1 or dp[i-103]==1 or dp[i-104]==1 or dp[i-105]==1:
    dp[i]=1
  else:
    dp[i]=0
print(dp[x])

Submission status: Runtime Error

Solution code:
x=int(input())
dp=[]*x
dp[0]=1
for i in range(1,x):
  if i-100>=0 and dp[i-100]==1 or dp[i-101]==1 or dp[i-102]==1 or dp[i-103]==1 or dp[i-104]==1 or dp[i-105]==1:
    dp[i]=1
  else:
    dp[i]=0
print(dp[x-1])

Submission status: Runtime Error

Solution code:
x = int(input())

quo = x // 100
rem = x % 100

req = rem // 5

if rem % 5:
  req += 1
  
if req > qum:
  print(0)
else:
  print(1)

Submission status: Runtime Error

Solution code:
x = int(input())

quo = x // 100
rem = u % 100

req = rem // 5

if rem % 5:
  req += 1
  
if req > qum:
  print(0)
else:
  print(1)

Submission status: Runtime Error

Solution code:
# coding: utf-8

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
X = int(input())
if X >= 2000:
    print(1)
elif X<= 99:
    print(0)
else:
    c = 0
    for i in range(1,20):
        if int(X//100) == i:
            if X%100 <= i*5:
                c=1
    

print(c)

Submission status: Runtime Error

Solution code:
X = int(input())
if X >= 2000:
    print(1)
else:
    c = 0
    for i in range(20):
        if int(X//100) == i:
            if X%100 <= i*5:
                c=1
    

print(c)

Submission status: Runtime Error

Solution code:
X = int(input())
if X >= 2000:
    print(1)
else:
    c = 0
    for i in range(20):
        if X%100 <= i*5:
            c=1
    

print(c)

Submission status: Runtime Error

Solution code:
X = int(input())
if X >= 2000:
    print(1)
else:
    c = 0
    for i in range(20):
        if X%100 <= i*5:
            c=1
        else:
            c=0
    

print(c)

Submission status: Runtime Error

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))
X = int(input())
prices = [100,101,102,103,104,105]

#
# dp = [0 for i in range(2002)]
# for price in prices:
#     dp[price] = 1
# for i in range(len(dp)):
#     for price in prices:
#         if i > price and dp[i-price] == 1:
#             dp[i] = 1
#
# if X > 2000:
#     print("1")
# else:
#     print(dp[X])



dp = [0 for i in range(X + 1)]
for price in prices:
    dp[price] = 1
for i in range(len(dp)):
    for price in prices:
        if i > price and dp[i - price] == 1:
            dp[i] = 1

print(dp[X])

Submission status: Runtime Error

Solution code:
a = input()
b = int(a/100)
c = a - 100*b
if c > b:
  print(0)
else:
  print(1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
dp=[0 for i in range(100001)]
dp[0]=1
a=[i for i in range(100,106)]
for i in range(100001):
  if dp[i]==1:
    for j in a:
      dp[i+j]=1
print(dp[int(input())])

Submission status: Runtime Error

Solution code:
import sys

x = int(input())

if x >= 2000:
    print(1)
    sys.exit()

for i in range(0,int(x/100)):
    if 100*i <= x <= 105*i:
        break

for a in range (0,i):
    for b in range (0,i):
        for c in range (0,i):
            for d in range (0,i):
                for e in range (0,i):
                    for f in range (0,i):
                        total = 100*a + 101*b + 102*c + 103*d + 104*e + 105*f
                        if total == x:
                            print(1)
                            sys.exit()

print(0)

Submission status: Runtime Error

Solution code:
N = int(input())
dp = [0]*100000
dp[100] = 1
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1
for i in range(200, N+1):
    if dp[i-100]==1 or dp[i-101]==1 or dp[i-102]==1 or dp[i-103]==1 or dp[i-104]==1  or dp[i-105]==1:
        dp[i]=1
print(dp[N])

Submission status: Runtime Error

Solution code:
import math
x = input()
m = x % 100
q = x / 100
if ( 5*q >= m ):
  print(1)
else:
  print(0)

Submission status: Runtime Error

Solution code:
X = int(input())

item_value = [100, 101, 102, 103, 104, 105]
dp = [0] * (X + 1)
for value in item_value:
    dp[value] = 1

for i in range(200, X + 1):
    for value in item_value:
        if dp[i - value] == 1:
            dp[i] = 1

print(dp[X])

Submission status: Runtime Error

Solution code:
import math
x = input()
d = math.floor(x / 100)
m = x % 100
if( m < 5*d):
  print(1)
else:
  print(0)