Problem:


Score : 200 points

Problem Statement

You have A 500-yen coins, B 100-yen coins and C 50-yen coins (yen is the currency of Japan).
In how many ways can we select some of these coins so that they are X yen in total?

Coins of the same kind cannot be distinguished. Two ways to select coins are distinguished when, for some kind of coin, the numbers of that coin are different.

Constraints

0 \leq A, B, C \leq 50

A + B + C \geq 1

50 \leq X \leq 20 000

A, B and C are integers.

X is a multiple of 50.

Input

Input is given from Standard Input in the following format:

A
B
C
X

Output

Print the number of ways to select coins.

Sample Input 1

2
2
2
100

Sample Output 1

2

There are two ways to satisfy the condition:

Select zero 500-yen coins, one 100-yen coin and zero 50-yen coins.

Select zero 500-yen coins, zero 100-yen coins and two 50-yen coins.

Sample Input 2

5
1
0
150

Sample Output 2

0

Note that the total must be exactly X yen.

Sample Input 3

30
40
50
6000

Sample Output 3

213



Sample input:
2
2
2
100


Sample output:
2

Submission status: Runtime Error

Solution code:
A = int(input()) # num of 500 coins
B = int(input()) # num of 100 coins
C = int(input()) # num of  50 coins
X = int(input()) # amount of payment

ans = 0

Bmax = B * 100
Cmax = C * 50

for a in range(A+1):
    rest = X - 500 * a
    if rest < 0:
        break
    if rest > Bmax + Cmax:
        continue
    if rest = 0:
        ans += 1
        continue
    else: # 0 < rest <= Bmax + Cmax
        for b in range(B+1):
            rest = rest - 100 * b
            if rest < 0:
                break
            if rest > Cmax:
                continue
            else:
                ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
n, a, b = map(int, input().split())
 
ans = 0
 
for x in range(n+1):
    y = str(x)
    z = list(map(int, y))
    sum_x = sum(z)
    
    if a <= sum_x and sum_x <= b:
        ans += x

print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())

counter = 0

for i in range(0, a + 1):
	if x - (500 * i) >= 0:
		x_f = x - (500 * i)

		if x_f == 0:
			counter += 1
			break

    	for j in range(0, b + 1):
    		if x_f - (100 * j) >= 0:
    			x_s = x_f - (100 * j)

    			if x_s == 0:
    				counter += 1
    				break

        		for k in range(0, c + 1):
        			if x_s - (50 * k) >= 0:
        				x_t = x_s - (50 * k)

        				if x_t == 0:
        					counter += 1
        					break


print(counter)

Submission status: Runtime Error

Solution code:
a, b, c, x =[int(input()) for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
coin_500 = int(input())
coin_100 = int(input())
coin_50 = int(input())
price = int(input())
cnt = 0

for i in range(coin_500+1):
    for j in range(coin_100+1):
        z = x - (500*i + 100*j)
        if z < 0:
            break
        elif z // 50 <= coin_50:
            cnt += 1

print(cnt)

Submission status: Runtime Error

Solution code:
A,B,C,X=map(int,input().split()) #500,100,50, total
#X=500*a+100*b+50*c
flag=0
count=0
for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if X==500*a+100*b+50*c:
        count=count+1
print(count)

Submission status: Runtime Error

Solution code:
coins = [int(input())/10 for _ in range(3)]
x = int(input())/10

ans=[1 for A in range(coins[0]) for B in range(coins[1]) if x-A-B<=coins[2]]

print(len(ans))

Submission status: Runtime Error

Solution code:
A,B,C,X=map(int,input().split()) #500,100,50, total
#X=500*a+100*b+50*c
flag=0
count=0
for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if X==500*a+100*b+50*c:
        count=count+1
        flag=1
if flag==1:
  print(count)
else:
  print(0)

Submission status: Runtime Error

Solution code:
A,B,C,X=map(int,input().split()) #500,100,50, total
#X=500*a+100*b+50*c

count=0
for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if X==500*a+100*b+50*c:
        count=count+1
        
print(count)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

value = 0
for a in range(0, A+1):
	for b in range(0, B+1):
        for c in range(0, C+1):
            if 500*a + 100*b + 50*c == X:
                value += 1
print(value)

Submission status: Runtime Error

Solution code:
    A = int(input())
    B = int(input())
    C = int(input())
    X = int(input())

    value = 0
    for a in range(0, A+1):
        for b in range(0, B+1):
            for c in range(0, C+1):
                if 500*a + 100*b + 50*c == X:
                    value += 1
    print(value)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

count = 0
for a in range (A+1):
    for b in range (B+1):
        for c in range (C+1):
            if a*500 + b*100 + c*50 = X:
                count += 1
print(count)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

count = 0
for a in A: 
    for b in B:
        for c in C:
            if 500*a + 100*b + 50*c == X:
                count += 1
    
print(count)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
Y = [A, B, C]
# A = list(map(int,input().split()))
A1 = list(map(lambda x: x+1,Y))
count = 0
sum = 0

for i in range(a):
    for j in range(b):
        for k in range(c):
            sum = 500*i + 100*j + 50*k 
            if X == sum:
                count+=1
print(count)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
answer = 0
for i in range(A+1):
	for j in range(B+1):
		for k in range(C+1):
			if X == 500*A + 100*B + 50*C:
				answer++
print(answer)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
answer = 0
for i in range(A+1):
	for j in range(B+1):
		for k in range(C+1):
			if X == 500*A + 100*B + 50*C
				answer++
print(answer)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

ans = 0

c500 = X // 500

if c500 > A:
    print(ans)
    exit()

for i in range(c500 + 1):
    c100 = (X - i*500) / 100
    if c100 > B:
        continue
    for j in range(c100 + 1):
        c50 = (X - i*500 - j*100)/50
        if c50 <= C:
           ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

ans = 0

c500 = X // 500

for i in range(c500 + 1):
    c100 = (X - i*500) / 100
    if c100 > B:
        continue
    for j in range(c100+1):
        c50 = (X - i*500 - j*100)/50
        if c50 <= C:
           ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
    a = int(input())
    b = int(input())
    c = int(input())
    x = int(input())

    count = 0 
    for i in range(a + 1):
        for j in range(b + 1):
            for k in range(c + 1):
                if x == (i * 500 + j * 100 + k * 50):
                    count += 1
    
    print(count)

Submission status: Runtime Error

Solution code:
arr = input() for i in range(4)
count = 0
sum = 0
for fihun in range(int(arr[0]) + 1):
    for hun in range(int(arr[1]) + 1):
        for fi in range(int(arr[2]) + 1):
            sum = fihun * 500 + hun * 100 + fi * 50
            if sum == int(arr[3]):
                count += 1
print(count)

Submission status: Runtime Error

Solution code:
arr = input() for i in range(4)
count = 0
sum = 0
for fihun in range(int(arr[0]) + 1):
    for hun in range(int(arr[1]) + 1):
        for fi in range(int(arr[2]) + 1):
            sum = fihun * 500 + hun * 100 + fi * 50
            if sum == int(range[3]):
                count += 1
print(count)

Submission status: Runtime Error

Solution code:
arr = [input() for i in range(4)]

count = 0
for fi in range(0, arr[0]):
    for hun in range(0, arr[1]):
        for fifty in range(0, arr[2]):
            sum = int(fi) * 500 + int(hun) * 100 + int(fifty) * 50
            if sum == arr[3]:
                count += 1
print(count)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
cnt = 0

for i in range(A + 1):
  for j in range(B + 1):
    if X - i * 500 - j * 100 % 50 == 0 and X - i * 500 - j * 100 <= 50 * C
        cnt += 1
        
print(cnt)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
X=int(input())
counter=0
for i1 in range(a):
  for i2 in range(b):
    for i3 in range(c):
      if 500*i1+100*i2+50*i3==x:
        counter+=1
print(counter)

Submission status: Runtime Error

Solution code:
list_500 = list(range(A+1))
list_100 = list(range(B+1))
list_50 = list(range(C+1))

for fh in range(len(list_500)):
    for oh in range(len(list_100)):
      for f in range(len(list_50)):
        if list_500[fh] * 500 + list_100[oh] * 100 + list_50[f] * 50 == X:
          counter += 1

print(counter)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
X=int(input())
 
an=X//A
bn=X//B
cn=X//C
 
counter = 0
 
for i in range(an):
  for j in range(bn):
    for k in range(cn):
      x = 500*i+100*j+50*k
      if X == x:
        counter += 1
print(counter)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
X=int(input())

an=X/A
bn=X/B
cn=X/C

counter = 0

for i in range(an):
  for j in range(bn):
    for k in range(cn):
      x = 500*i+100*j+50*k
      if X == x:
        counter += 1
print(counter)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0

for i in range(0,a):
    if x < 500 * i:
        break
    if x == 500 * i:
        ans += 1
        break
    for j in range(0,b):
        if x < 500 * i + 100 * j:
            break
        if x == 500 * i + 100 * j:
            ans += 1
            break
        for k in range(0,c)
            if x < 500 * i + 100 * j + 50 * k:
                break
            if x == 500 * i + 100 * j + 50 * k:
                ans += 1
                break

print(ans)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

res += 0

for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if a*500 + 100*b + c*50 == X:
        res += 1
        
print(res)

Submission status: Runtime Error

Solution code:
A, B, C, X = map(int, input().split())
ans = 0
for a in range(A+1):
    for b in range(B+1):
        for c in range(C+1):
            if X == 500*a + 100*b + 50*c:
                ans += 1
            else:
                continue
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c,x=map(int,input().split())
cnt = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*a+100*b+50*c == x:
        cnt +=1
print(cnt)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

res = 0

for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if a*500 + b*100 + c*50 == N:
        res += 1
       
print(res)

Submission status: Runtime Error

Solution code:
count_50 = int(inpiut())
count_100 = int(inpiut())
count_500 = int(inpiut())
target = int(input())
count = 0

for num_50 in range(0, count_50 + 1):
    total = num_50 * 50
    if total == target:
        count += 1
        continue
    for num_100 in range(0, count_100 + 1):
        total_2 = num_50 * 50 + num_100 * 100
        if total_2 == target:
            count += 1
            continue
        for num_500 in range(0, count_500+1):
            total_3 = num_50 * 50 + num_100 * 100 + num_500 * 500
            if total_3 == target:
                count += 1
                continue
print(count)

Submission status: Runtime Error

Solution code:

A = int(input())
B = int(input())
C = int(input())
X = int(input())
memo = np.zeros(3).reshape(1,3)

for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            if X == 500*i + 100*j + 50*k :
                result = np.array([i,j,k])
                memo = np.vstack([memo,result])

print(len(memo[1:]))

Submission status: Runtime Error

Solution code:
A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 #初期値
           
#全件走査
maxA = X // 500 if 500 * A > X else A
for i in range(maxA + 1):
  maxB = (X - 500 * i) // 100 if 100 * B > (X - 500 * i) else B
  for j in range(maxB + 1):
    q,mod = divmode (X - 500 * i - 100 * j ,50)
    if mod == 0 and q <= C:count += 1    
print(count)

Submission status: Runtime Error

Solution code:
A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 #初期値
           
#全件走査
maxA = X // 500 if 500 * A > X else A
  for i in range(maxA + 1):
    maxB = (X - 500 * i) // 100 if 100 * B > (X - 500 * i) else B
    for j in range(maxB + 1):
      q,mod = divmode (X - 500 * i - 100 * j ,50)
      if mod == 0 and q <= C:count += 1    
print(count)

Submission status: Runtime Error

Solution code:
A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 #初期値
           
#全件走査
maxA = X // 500 if 500 * A > X else A
for i in range(maxA + 1):
  maxB = (X - 500 * i) // 100 if 100 * B > (X - 500 * i) else B
  for j in range(maxB + 1):
    q,mod = divmode (X - 500 * i - 100 * j ,50)
    if mod == 0 and q <= C:count += 1      
print(count)

Submission status: Runtime Error

Solution code:
A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 //初期値
           
#全件走査

Submission status: Runtime Error

Solution code:
A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 //初期値
           
#全件走査
maxA = X // 500 if 500 * A > X else A

Submission status: Runtime Error

Solution code:
A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 //初期値
           
#全件走査
maxA = X // 500 if 500 * A > X else A
for i in range(maxA + 1):
  maxB = (X - 500 * i ) // 100 if 100 *B > (X - 500 * i) else B
  for j in range(maxB + 1):
    q,mod = divmode (X - 500 * i - 100 * j ,50)
    if mod == 0 and q <= C:count += 1      
print(count)

Submission status: Runtime Error

Solution code:
A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 //初期値
           
#全件走査
maxA = X // 500 if 500 * A > X else A
for i in range(maxA + 1):
  maxB = (X - 500 * i ) // 100 if 100 *B > (X - 500 * i) else B
  for j in range(maxB + 1):
    q,mod = divmode (X - 500 * i - 100 * j ,50)
    count += 1 if mod == 0 and q <= C     
print(count)

Submission status: Runtime Error

Solution code:
A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 //初期値
           
#全件走査
maxA = X // 500 if 500 * A > X else A
for i in range(maxA + 1):
  maxB = (X - 500 * i ) // 100 if 100 *B > (X - 500 * (i + 1) )  else B
  for j in range(maxB+1):
    q,mod = divmode (X - 500 * i - 100 * j,50)
    count += 1 if mod == 0 and q <= C     
print(count)

Submission status: Runtime Error

Solution code:
def main():
    A = input()  # 500円の枚数
    B = input()  # 100円の枚数
    C = input()  # 50円の枚数

    x = input()
    result = 0
    for a in range(A):
        for b in range(B):
            for c in range(C):
                total = 500 * a + 100 * b + 50 * c
                if total == x:
                    result += 1

    return result


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
A,B,C,X = map(int, input().split())

cnt = 0
for i in range(0, A+1):
        for j in range(0, B+1):
                for k in range(0, C+1):
                        if int(500*i + 100*j + 50*k) == X:
                            cnt += 1
                     
print(cnt)

Submission status: Runtime Error

Solution code:
A,B,C,X = map(int, input().split())

cnt = 0
for i in range(A+1):
        for j in range(B+1):
                for k in range(C+1):
                        if (500*i + 100*j + 50*k) == X:
                            cnt += 1
                        else:
                            cnt += 0
print(cnt)

Submission status: Runtime Error

Solution code:
A,B,C,X = map(int, input().split())

cnt = 0
for i in range(A+1):
        for j in range(B+1):
                for k in range(C+1):
                        if 500*i + 100*j + 50*k == X:
                            cnt += 1
                        else:
                            cnt += 0
print(cnt)

Submission status: Runtime Error

Solution code:
A,B,C,X = map(int, input().split())

cnt = 0
for i in range(A):
        for j in range(B):
                for k in range(C):
                        if 500*A + 100*B + 50*C == X:
                            cnt += 1
                        else:
                            cnt += 0
print(cnt)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

ret = 0
for i in range(X / A + 1):
  for j in range((X - i * 500) / B + 1):
    for k in range((X - i * 500 - j * 100) / C + 1):
      if i * 500 + j * 100 + k + 50 == x:
        ret += 1
print(ret)

Submission status: Runtime Error

Solution code:
a,b,c,x = map(int,input().strip())


count=0

for a_num in range(a+1):
  for b_num in range(b+1):
    for c_num in range(c+1):
      if a*500+b*100+c*50==x:
        count+=1

print(str(count))

Submission status: Runtime Error

Solution code:
a=input()#500
b=input()#100
c=input()#50
x=input()

count=0

for a_num in range(a+1):
  for b_num in range(b+1):
    for c_num in range(c+1):
      if a*500+b*100+c*50==x:
        count+=1

print(str(count))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
res=0
for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            if 500*i + 100*j + 50*k == X:
                res + = 1
print(res)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
res=0
for i in range(A+1):
  	for j in range(B+1):
      	for k in range(C+1):
          	if 500*i + 100*j + 50*k == X:
              	res + = 1
print(res)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

count = 0

for i in range(A+1):
  for j in range(B+1):
    for k in range(C+1):
      if 500 *i + 100 *j + 50 *k == X
          count += 1

print(count)

Submission status: Runtime Error

Solution code:
aa = input()
bb = input()
cc = input()
x = input()
count = 0

for a in range(aa):
  for b in range(bb):
    for c in range(cc):
      if 500*a + 100*b + 50*c == x:
        count+=1
print(count)

Submission status: Runtime Error

Solution code:
b = [int(e) for e in input().split()]
count=0

for i in range(b[0]+1):
    for j in range(b[1]+1):
        for k in range(b[2]+1):
            x = 500*i+100*j+50*k
            if(x == b[3]):
                count += 1

print(count)

Submission status: Runtime Error

Solution code:
a = []
for tmp in s.split():
    a.append(int(tmp))

cou = 0
for yen50 in range(a[2]+1):
    for yen100 in range(a[1]+1):

        for yen500 in range(a[0]+1):
            if (yen50*50 + yen100*100 + yen500*500) / a[3] == 1:
                cou += 1


print(cou)

Submission status: Runtime Error

Solution code:
a,b,c,x=map(int,input().split())
ans=0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x==500*i+100*j+50+k:
                ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            in i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
X=int(input())
cnt=0

for i in range(A + 1):
  for j in range(B + 1):
    for k in range(C + 1):
      if (500*i + 100*j + 50*k) == X
      cnt += 1

print(cnt)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0

for i in range(len(a)):
  for j in range(len(b)):
    for k in range(len(c)):
      if a+b+c == x:
        ans = ans+1
        
print(ans)

Submission status: Runtime Error

Solution code:
b = int(input())
c = int(input())
x = int(input())

cnt = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 500*i + 100*j + 50*k == x:
                cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
# coding: utf-8
# 500円玉の枚数
a = int(input())
# 100円玉の枚数
b = int(input())
# 50円玉の枚数
c = int(input())
# 合計金額
x = int(input())
 
def main():
    flag = "FALSE"
    count = 0
    for i in range(0, a+1):
        for j in range(0, b+1):
            for k in range(0, c+1):
                total = int(500*i+100*j+50*k)
                if total == x:
                    count = count + 1
                else:
                    pass
    print(count)
 
if __name__ == '__main__':
    main()
# coding: utf-8
# 500円玉の枚数
a = int(input())
# 100円玉の枚数
b = int(input())
# 50円玉の枚数
c = int(input())
# 合計金額
x = int(input())

def main():
    flag = "FALSE"
    count = 0
    for i in range(0, a+1):
        for j in range(0, b+1):
            for k in range(0, c+1):
                total = int(500*i+100*j+50*k)
                if total == x:
                    count = count + 1
                else:
                    pass
    print(count)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
a = X//(500*A)
b = X//(100*B)
c = X//(50*C)
ans = 0
for l in range(a+1):
    for m in range(b+1):
        for n in range(c+1):
            if 500*l+100*m+50*n ==X:
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
a = X//(500*A)
b = X//(100*B)
c = X//(50*C)
ans = 0
for l in range(a+1):
    total=[]
    d = 500*l
    total.append(d)
    for m in range(b+1):
        e = 100*m
        total.append(e)
        for n in range(c+1):
            f = 50*n
            total.append(f)
            if sum(total) ==X:
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
a = X//(500*A)
b = X//(100*B)
c = X//(50*C)
total = []
ans = 0
for l in range(a+1):
  d = 500*l
  total.append(d)
  for m in range(b+1):
    e = 100*m
    total.append(e)
    for n in range(c+1):
      f = 50*n
      total.append(f)
      if sum(total) ==X:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
X=int(input())
counti = 0

for a in range(A)+1:
  for b in range(B)+1:
    for c in range(C)+1:
      if 500*a + 100*b + 50*c == X:
        counti += 1

print(counti)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())

count = 0

for i in range(x/c):
    y = x - 50*i
    if y = 0:
        count = count + 1
    else:
        z = y // 2
        count = count + z

print(count)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())

print(x)

roop1 = x // a
count = 0

for i in roop1:
    roop2 = (x - 500*i) // b
    for j in roop2:
        roop3 = (x - 500*i - 100*j) // c
        count = count + 1

print(count)

Submission status: Runtime Error

Solution code:
num_list = [int(input()) for i in range(3)]
result_yen = int(intput())

count = 0

for yen_500 in range(coin_list[0]):
    for yen_100 in range(coin_list[1]):
        for yen_50 in range(coin_list[2]):
            if result_yen == yen_500*500 + yen_100*100 + yen_50 *50:
                count += 1
                
print(count)

Submission status: Runtime Error

Solution code:
a=int(input())
b=ibt(input())
c=int(input())
x=int(input())
ans=0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x==500*i+100*j+50:
                ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
import itertools
A = int(input())
B = int(input())
C = int(input())
AL = [500*i for i in range(A)]
BL = [100*i for i in range(B)]
CL = [50*i for i in range(C)]
num = 0

for comb in itertools.product(AL,BL,CL):
  x,y,z = comb
  if x+y+z == X:
    num += 1
print(num)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
x=int(x/50)
countlist=[]

for e in range(a+1):
    if x < e*10:
        break
    else:
        x -= e*10
        count=0
        for f in range(b+1):
            if x < f*2 :
                break
            else:
                x-=2*f
                count=0
                for g in range(c+1):
                	if x<g:
                      break
                    else:
                     	count = count +1
				countlist.append(count)

print(sum(countlist))

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
x=int(x/50)
countlist=[]

for e in range(a+1):
    if x < e*10:
        break
    else:
        x -= e*10
        count=0
        for f in range(b+1):
            if x < f*2 :
                break
            else:
                x-=2*f
                count=0
                for g in range(c+1):
                	if x<g:
                      break
                    else:
                     	count = count +1
						countlist.append(count)

print(sum(countlist))

Submission status: Runtime Error

Solution code:
#l = list(map(int, input().split(' ')))

#num = int(input())
#S = str(input())
# k = (X - Ai - Bj) / C
# C = 0
#
A=int(input())
B=int(input())
C=int(input())
X=int(input())
sum = 0

for i in range(0,A+1):
    for j in range(0,B+1):
        for k in range(0,C+1):
            if(500*i+100*j+50*k==X):
                sum+=

print(sum)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
cond = int(input())

count = 0
for i in range(a+1):
    for j in range(b+1):
      for k in range(c+1):
	  	  res = 500 * i + 100 * j + 50 * k
          if(res == cond):
            count = count + 1
print(count)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
cond = int(input())

count = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
		res = 500 * i + 100 * j + 50 * k
        if(res == cond):
          count = count + 1
print(count)

Submission status: Runtime Error

Solution code:
a,b,c,x=map(int,input().split())
print([500*x+100*y+50*z for z in range(c+1) for y in range(b+1) for x in range(a+1)].count(x))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

A=int(input())
B=int(input())
C=int(input())
X=int(input())

ans = 0
for i in range(A+1):
  for j in range(B+1):
    if 0 <= (x - 500*i - 100*j) // 50 <= C:
      ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
cnt = 0

for i in range(A+1):
  for j in range(B+1):
    for k in range(C+1):
      if 500*i + 100*j + 50*k == X:
        cnt += 1
ans(cnt)

Submission status: Runtime Error

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

b = input()
b = int(b)

c = input()
c = int(c)

d = input()
d = int(d)

ans = 0

for i in range(0, a+1):
  for j in range(0, b+1):
    for k in range(0, c+1):
      if x == i*500 + j*100 + k*50:
        ans = ans + 1

Submission status: Runtime Error

Solution code:
a, b, c, x = [int(input()) for _ in range(4)]
ans = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i+100*j+50*k == x:
        ans += 1
prit(ans)

Submission status: Runtime Error

Solution code:
a, b, c, x = [int(input()) for _ in range(4)]
ans = 0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*a+100*b+50*c == x:
        ans += 1
prit(ans)

Submission status: Runtime Error

Solution code:
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in (a+1):
    for j in (b+1):
        for k in (c+1):
            if i*500 + j*100 + k*50 == x:
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())

for a in range(a + 1):
    for b in range(b + 1):
        for c in range(c + 1):
            sum = 500 * a + 100 * b + 50 * c
            if sum == x:
                ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

ans = 0 
for i in range(0, A + 1):
  numi = i * 500
  if numi == X:
    ans += 1
  elif numi < X:
    for j in range(0, B + 1):
      numj = j * 100 + numi
      if numj == X:
        ans += 1
      elif numj < X:
        for k in range(0, k + 1):
          numk = k * 50 + numj
          if numk == X:
            ans += 1
          elif numk < X:
            continue
          else:
            break
      else:
        break
  else:
    continue
print(ans)

Submission status: Runtime Error

Solution code:
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for K in range(c+1):
            if i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0
for i in range(0, a+1):
    for j in range(0, b+1):
        for k in range(0. c+1):
            if 500*i + 100*j + 50*k == x:
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0
for i in range(0, a+1):
    for j in range(0, b+1):
        for k in range(0. c+1):
            if 500*i + 100*j + 50*k == x
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c,x = [int(input() for _ in range(4))]
ans = 0
for i  in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i*500 + j*100 + k*50 == x:
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

ans = 0

for a in range(A + 1):
    for b in range(b + 1):
        for c in range(c + 1):
            if 500 * a + 100 * b + 50 * c == X:
                ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
A, B, C = map(int, [input() for i in range(4)])
X = int(input()) / 50

count = 0
for a in range(A+1):
    for b in range(B+1):
        for c in range(C+1):
            if 10 * a + 2 * b + c == X:
                count += 1

print(count)

Submission status: Runtime Error

Solution code:
A, B, C, X = (int(input()) for i in range(4))

cnt = 0
for a in range(A+1):
  for b in range(B+1):
  	for c in range(C+1):
    	if 500*a + 100*b + 50*c == X:
        	cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
A, B, C, X = (int(input()) for i in range(4))

cnt = 0
for a in range(A+1):
  for b in range(B+1)
  	for c in range(C+1)
    	if 500*a + 100*b + 50*c == X:
        	cnt += 1
print(cnt)