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: Wrong Answer

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

if (x%100==0 and c%2!=0)or (x%100!=0 and c%2==0):
  print(0)
else:
  q=(x//500)*7
  w=((x%500)//100)*2
#if (x%500)%100==0:
  print(q+w)
#else:
 # print(q+w+1)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
ans = 0
for i in range(A + 1):
  if 500 * i > X:
    break
  for j in range(B + 1):
    if 500 * i + 100 * j > X:
      break
    if X - 500 * i - 100 * j < 50 * C:
      ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力

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

i = 0
j = 0
k = 0
cnt = 0
sum = 0
while i <= A:
    j = 0
    while j <= B:
        k = 0
        while k <= C:
            if i+j+k >50:
                break
            else:
                sum = 500*i + 100*j + 50*k
                if X == sum:
                    cnt += 1
            k += 1
            sum = 0
        j += 1
    i += 1

print(cnt)

Submission status: Wrong Answer

Solution code:


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    a = int(input())
    b = int(input())
    c = int(input())
    x = int(input())
    
    ans = 0
    
    for n in range(a):
        for m in range(b):
            for l in range(c):
                if (500 * n + 100 * b + 50 * c) == x:
                    ans = ans + 1

    print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
print(len([1 for i in range(b+1) for j in range(c+1) if (x-100*i-50*j)%500==0 and 0<=x-100*i-50*j<=a]))

Submission status: Wrong Answer

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

cnt = 0

for i in range(a + 1):
  for j in range(b + 1):
    for k in range(c + 1):
      s = int(i + j*2 + k*10)
      if s == x:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c,x = [int(input()) for i in range(4)]
count = 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:
                count += 1

print(count)

Submission status: Wrong Answer

Solution code:
a,b,c,x = [int(input()) for i in range(4)]
count = 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):
                count += 1

print(count)

Submission status: Wrong Answer

Solution code:
a = [ int(input()) for i in range(4) ]
count = 0


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

print(count)

Submission status: Wrong Answer

Solution code:
[a,b,c,d]=[int(input()) for i in range(1,4+1)]
a1 = d // 500
b1 = d// 100
c1 = d// 50
coun = 0
for i in range(0,a1+1):
    a = 500*i
    if a == d:
        coun = coun +1
        break
    for j in range(0,b1+1-5*i):
        s = a + 100*j
        if s == d :
            coun = coun +1
            break
        for k in range(0,c1+1-10*i-2*j):
            v = s + 50*k
            if v == d :
                coun = coun+1
                break
print(coun)

Submission status: Wrong Answer

Solution code:
[a,b,c,d]=[int(input()) for i in range(1,4+1)]
a1 = d // 500
b1 = d// 100
c1 = d// 50
value = 0
count = 0
for i in range(0,a1+1):
    value = value + 500*i
    for j in range(0,b1+1-5*i):
        value = value + 100*j
        for k in range(0,c1+1-10*i-2*j):
            value = value + 50*k
            if value == d :
                count = count+1
                break
            value = 0
print(count)

Submission status: Wrong Answer

Solution code:
a = [ int(input()) for i in range(4) ]
count = 0

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

print(count)

Submission status: Wrong Answer

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

def calc(order, abc, num):
  N = order*abc
  if num == N:
    return 'OK'
  if num > N:
    return num - N
  if num < N:
    return num

num_X = X/50
total = 0
for i in range(A+1):
    order_A = 10
    abc_A = i
    return_A = calc(order_A, abc_A, num_X)
    if return_A == 'OK':
        total += 1
    else:
        for l in range(B+1):
            order_B = 2
            abc_B = l
            return_B = calc(order_B, abc_B, return_A)
            if return_B == 'OK':
    	        total += 1
            else:
                for k in range(C+1):
                    order_C = 1
                    abc_C = k
                    return_C = calc(order_C, abc_C, return_B)
                    if return_C == 'OK':
                        total += 1
print(total)

Submission status: Wrong Answer

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*a+100*b+50*c==x:
        count+=1
print(count)

Submission status: Wrong Answer

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

counter = 0
for use_a in range(a + 1):
    if 500 * use_a > x:
        continue
    rest = x - 500 * use_a
    for use_b in range(b + 1):
        if 100 * use_b > rest:
            continue
        rest = rest - 100 * use_b
        for use_c in range(c + 1):
            if 50 * use_c != rest:
                continue
            counter += 1

print(counter)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for s in range(a+1):
    if s*500 == x:
        count += 1
    for t in range(b+1):
        if s*500 + t*100 == x:
            count += 1
        for u in range(c+1):
            if s*500 + t*100 + u*50 == x:
                count += 1

print(count)

Submission status: Wrong Answer

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

for s in range(a+1):
    if s*500 == x:
        count += 1
    for t in range(b+1):
        if s*500 + t*100 == x:
            count += 1
        for u in range(c+1):
            if s*500 + t*100 + u*50 == x:
                count += 1
                print("500:", s, "100:", t, "50:", u)

print(count)

Submission status: Wrong Answer

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

for s in range(a+1):
    if s*500 == x:
        count += 1
        print("500:", s)
    for t in range(b+1):
        if s*500 + t*100 == x:
            count += 1
            print("500:", s, "100:", t)
        for u in range(c+1):
            if s*500 + t*100 + u*50 == x:
                count += 1
                print("500:", s, "100:", t, "50:", u)

print(count)

Submission status: Wrong Answer

Solution code:
a=int(input(""))
b=int(input(""))
c=int(input(""))
x=int(input(""))
def countcourse(r,t,y,u):
    cnt=0
    for h in range(r):
        for l in range(t):
            for o in range(y):
                if 500*h+100*l+50*o==u:
                    cnt+=1
            cnt-=1
        cnt-=1
    cnt-=1
    return cnt
print(countcourse(a,b,c,x))

Submission status: Wrong Answer

Solution code:
a=int(input(""))
b=int(input(""))
c=int(input(""))
x=int(input(""))
def countcourse(r,t,y,u):
    cnt=0
    for h in range(r):
        for l in range(t):
            for o in range(y):
                if 500*h+100*l+50*o==u:
                    cnt+=1
    return cnt
print(countcourse(a,b,c,x))

Submission status: Wrong Answer

Solution code:
x=int(input())
c=0
y,z,d=int(input()),int(input()),int(input())
for i in range(x+1):
    for j in range(y+1):
        for k in range(z+1):
            f=500*i+100*j+50*k
            if(f==x):
                c+=1
print(c)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
ans=0
for ai in range(a+1):
  for bi in range(b+1):
    for ci in range(c+1):
      y=500*ai+100*bi+50*ci
      if x == y:
        ans+=1
        print(ai,bi,ci)
      if y>x:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
aa=x//500
bb=x//100
cc=x//50
ans=0
for ai in range(aa+1):
  for bi in range(bb+1):
    for ci in range(cc+1):
      y=500*ai+100*bi+50*ci
      if x == y:
        ans+=1
      if y>x:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
aa=x//500
bb=x//100
cc=x//50
ans=0
for ai in range(aa):
  for bi in range(bb):
    for ci in range(cc):
      y=500*ai+100*bi+50*ci
      if x == y:
        ans+=1
      if y>x:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
A = 30
B = 40
C = 50
X = 6000

cnt = 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:
                cnt+=1
print(cnt)

Submission status: Wrong Answer

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

pattern = 0

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

print(pattern)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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):
        for k in range(c+1):
            if x == a*500 + b*100 + c*50 :
                ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(4)]
count = 0
for i in range(a[0], -1, -1) :
  y = a[3]
  if y % 50 != 0:
    break;
  if (y > 500*i):
    y -= i*500
    if y == 0:
      count += 1
      continue
  for j in range(a[1], -1, -1) :
    tmp1 = y
    if (tmp1 > j*100) :
      tmp1 -= j*100
      if tmp1 == 0:
        count += 1
        continue
    for k in range(a[2], -1, -1) :
      tmp2 = tmp1
      if (tmp2 > k*50) :
        tmp2 -= k*50
        if tmp2 == 0:
          count += 1
          continue
print(count)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(4)]
count = 0
for i in range(a[0], -1, -1) :
  y = a[3]
  if y % 50 != 0:
    break;
  if (y > 500*i):
    y -= i*500
    if y == 0:
      count += 1
      continue
  for j in range(a[1], -1, -1) :
    if (y > j*100) :
      y -= j*100
      if y == 0:
        count += 1
        continue
    for k in range(a[2], -1, -1) :
      if (y > k*50) :
        y -= k*50
        if y == 0:
          count += 1
          continue
print(count)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(4)]
count = 0
for i in range(a[0], -1, -1) :
  y = a[3]
  if (y > 500*i):
    y -= i*500
    if y == 0:
      count += 1
      continue
  for j in range(a[1], -1, -1) :
    if (y > j*100) :
      y -= j*100
      if y == 0:
        count += 1
        continue
    for k in range(a[2], -1, -1) :
      if (y > k*50) :
        y -= k*50
        if y == 0:
          count += 1
          continue
print(count)

Submission status: Wrong Answer

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

res = 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:
				res += 1
print(res)

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

Solution code:
N=int(input())
card_list=sorted(list(map(int,input().split())),reverse=True)
A=sum(card_list[0::2])
B=sum(card_list[1::2])
print(A-B)

Submission status: Wrong Answer

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

ans = 0

for a in range(A+1):
    if 500 * a > X:
        break
    for b in range(B+1):
        if 500 * b > X:
            break
        x = X - 500*a -100*b

        if x%50 == 0 and x >= 0:
            if x//50 <= C:
                ans += 1

print(ans)

#

Submission status: Wrong Answer

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

ans = 0

#　これだとダメ
# for a in range(A+1):
#     x = X - a*500
#     for b in range(B+1):
#         x -= b*100
#         for c in range(C+1):
#             x -= c*50
#             print(a,b,c,x)
#             if x == 0:
#                 ans += 1

# これはOK
# 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


# こう書くとfor文一回省ける

for a in range(A+1):
    for b in range(B+1):
        x = X - 500*a -100*b

        if x%50 == 0:
            if x//50 <= C:
                ans += 1

print(ans)

#

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
i=0
for a in range(0,A+1):
  for b in range(0,B+1):
    for c in range(0,C+1):
      500*a + 100*b + 50*c == X
      i = i+1
print(i)

Submission status: Wrong Answer

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

for a in range(0,A+1,1):
  y = X-500*a
  if y<500:
    break

for b in range(0,B+1,1):
  z = y-100*b
  if z<100:
    break

for c in range(0,C+1,1):
  w = z-50*a
  if w<50:
    break
if w != 0:
  print(0)
else:
  d = (X-y)/500
  e = (y-z)/100
  f = (z-w)/50
  i = -1
  d = round(d)
  e = round(e)
  f = round(f)
  
  for n in range(0,d+1,1):
    if B-e-5*n >= 0:
      i=i+1
  for m in range(0,e+5*i+1,1):
    if C-f-2*m >= 0:
      i=i+1
  print(i)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0
ab = 0
for a_count in range(a):
    for b_count in range(b):
        ab = a_count * 500 + b_count * 100
        if ab <= x <= (ab + c * 50):
            ans += 1
print(ans)

Submission status: Wrong Answer

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

def dfs(x, i, a, b , c):
  	if x < 0:
  		return 0
  	if x == 0:
  		return 1
  	
  	if i == 3:
  		return 1 if x == 0 else 0
  	r = 0
  	m = {0:a,1:b,2:c}
  	v = {0:500,1:100,2:50}

  	for k in range(1, m[i] + 1):
  		r += dfs(x - k * v[i], i+1, a,b,c)
  	return r

print dfs(x,0,a,b,c)

Submission status: Wrong Answer

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

def f(x, a, b , c):
  	if x == 0:
  		return 1
  	
  	r = 0
  	if x - 500 >= 0 and a :
  		r += f(x-500, a-1, b, c)
  	if x - 100 >= 0 and b :
  		r += f(x-100, a, b-1, c)
  	if x - 50 >= 0 and c:
  		r += f(x-50, a, b, c-1)
  	return r

print f(x,a,b,c)

Submission status: Wrong Answer

Solution code:
#50円玉
a = int(input())
#100円玉
b = int(input())
#150円玉
c = int(input())
#50の倍数
x = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
in_a = input()
in_b = input()
in_c = input()
in_x = input()

A = int(in_a)
B = int(in_b)
C = int(in_c)
X = int(in_x)

count = 0
for i in range(A+1):
    for j in range(B+1):
        k = ( X - 500*i - 100*j ) / 50
        print(f'k：{k}')
        if k < 0:
            break;
        elif k.is_integer() and k <= C:
            count +=1
            print('clear', k, count)

print(count)

Submission status: Wrong Answer

Solution code:
in_a = input()
in_b = input()
in_c = input()
in_x = input()

A = int(in_a)
B = int(in_b)
C = int(in_c)
X = int(in_x)

count = 0
for i in range(A+1):
    for j in range(B+1):
        k = ( X - 500*i - 100*j ) / 50
        if k.is_integer() and k <= C:
            count +=1

print(count)

Submission status: Wrong Answer

Solution code:
A,B,C,X = [int(input()) for i in range(4)]
X_original = X
n = 0

for i in range(int(A)+1):
    X = X_original
    Xtemp = X - i*500
    for j in range(int(B)+1):
        Xtemp = X - j*100
        for k in range(int(C)+1):
            Xtemp = X-k*50
            if Xtemp== 0:
                n += 1

print(n)

Submission status: Wrong Answer

Solution code:
A,B,C,X = [int(input()) for i in range(4)]
X_original = X
n = 0

for i in range(int(A)+1):
    X = X_original
    X = X - i*500
    for j in range(int(B)+1):
        X = X - j*100
        for k in range(int(C)+1):
            if X-k*50 == 0:
                n += 1

print(n)

Submission status: Wrong Answer

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

n = 0

A,B,C= inputlist[0],inputlist[1],inputlist[2]

for i in range(int(A)+1):

    X = inputlist[3] 

    X = int(X) - i*500

    for j in range(int(B)+1):

        X = X - j*100

        for k in range(int(C)+1):

            X = X -k*50

            if X == 0:
                n += 1

print(n)

Submission status: Wrong Answer

Solution code:
import numpy as np

A_init = 500
B_init = 100
C_init = 50

A_list = [A_init * i for i in range(1,int(input())+1)]
B_list = [B_init * i for i in range(1,int(input())+1)]
C_list = [C_init * i for i in range(1,int(input())+1)]

X = int(input())

All_list = np.concatenate([A_list, B_list, C_list], 0)
print(np.count_nonzero([k+[i for i in All_list] == X for k in All_list]))

Submission status: Wrong Answer

Solution code:
import numpy as np

A_init = 500
B_init = 100
C_init = 50

A_list = [A_init * i for i in range(1,int(input())+1)]
B_list = [B_init * i for i in range(1,int(input())+1)]
C_list = [C_init * i for i in range(1,int(input())+1)]

X = int(input())

All_list = np.concatenate([A_list, B_list, C_list], 0)
np.count_nonzero([k+[i for i in All_list] == X for k in All_list])

Submission status: Wrong Answer

Solution code:
List = []
for i in range (3):
  List.append(int(input()))
X=int(input())
res = 0
c = 0
for i in range(List[0]):
  for j in range(List[1]):
    c = int(X/50) - 10 * i - 2 * j
    if 0<= c <= List[2]:
      res+=1
print(res)

Submission status: Wrong Answer

Solution code:
List = []
for i in range (3):
  List.append(int(input()))
X=int(input())
res = 0
c = 0
for i in range(List[0]):
  for j in range(List[1]):
    c = X - 500 * i - 100 * j
    if 0<=c<=List[2]:
      res+=1
print(res)

Submission status: Wrong Answer

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

count = 0
for a in range(A+1):
  for b in range(B+1):
    left = X - (500*a + 100*b)
    #print(left)
    if C*50 >= left and left > 0:
      if left % C == 0:
        #print("count",left)
        count += 1
      else:
        print("notcount",left)
    elif left == 0:
      #print("count")
      count += 1
    

print(count)

Submission status: Wrong Answer

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

count = 0
for a in range(A):
  for b in range(B):
    left = X - (500*a + 100*b)
    
    if C*50 >= left and left >= 0:
      count += 1

print(count)

Submission status: Wrong Answer

Solution code:
a_500 = int(input())
b_100 = int(input())
c_50 = int(input())
kadai = int(input())
sum_coin = 0
count = 0
sum_list = []

for n in range(a_500 + 1):
    sum_coin = (n * 500)
    for m in range(b_100 + 1):
        sum_coin = sum_coin + (100 * m)
        for l in range(c_50 + 1):
            sum_coin = sum_coin + (50 * l)
            sum_list.append(sum_coin)
            if l != (c_50 +1):
                sum_coin = 0 + (100 * m) + (500 * n)
            else:
                if m != (b_100 + 1):
                    sum_coin = 0 + (500 * n)
                else:
                    sum_coin = 0
print(sum_list.count(kadai))

Submission status: Wrong Answer

Solution code:
a_500 = int(input())
b_100 = int(input())
c_50 = int(input())
kadai = int(input())
sum_coin = 0
count = 0
sum_list = []

for n in range(a_500 + 1):
    sum_coin = (n * 500)
    for m in range(b_100 + 1):
        sum_coin = sum_coin + (100 * m)
        for l in range(c_50 + 1):
            sum_coin = sum_coin + (50 * l)
            sum_list.append(sum_coin)
            sum_coin = 0 + (100 * n) + (500 * m)
print(sum_list.count(kadai))

Submission status: Wrong Answer

Solution code:
c500 = int(input())
c100 = int(input())
c50 = int(input())
x = int(input())
count = 0
 
for c500_n in range(c500):
  for c100_n in range(c100):
    for c50_n in range(c50):
      if c500_n*500 + c100_n*100 + c50_n*50 == x:
        count += 1
 
print(count)

Submission status: Wrong Answer

Solution code:
c500 = int(input())
c100 = int(input())
c50 = int(input())
x = int(input())
count = 0
 
for c500_n in range(1, c500):
  for c100_n in range(1, c100):
    for c50_n in range(1, c50):
      if c500_n*500 + c100_n*100 + c50_n*50 == x:
        count += 1
 
print(count)

Submission status: Wrong Answer

Solution code:
A,B,C,X = map(int, open(0).read().split())

ans = 0

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

ans

Submission status: Wrong Answer

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

for c_value in range(c):
    for b_value in range(b):
        for a_value in range(a):
            answer_values.append(c_value * 500 + b_value * 100 + a_value * 50)

print(answer_values.count(x))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# check

if X % 100 == 50 and C == 0:
    print(0)
else:
    all_case = len(
        [
            1
            for a in range(A)
            for b in range(B)
            for c in range(C)
            if 500 * a + 100 * b + 50 * c == X
        ]
    )
    
    print(all_case)

Submission status: Wrong Answer

Solution code:
A500 = int(input())
B100 = int(input())
C50 = int(input())
X = int(input())

c = 0
for i in range(A500):
  for j in range(B100):
    for k in range(C50):
      if X == i*500 + j* 100 + k*50:
        c+=1
print(c)

Submission status: Wrong Answer

Solution code:
A = int(input()) #500円玉
B = int(input()) #100円玉
C = int(input()) #50円玉
X = int(input()) #この値にする合計を求める

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

Submission status: Wrong Answer

Solution code:
A = int(input()) #500円玉
B = int(input()) #100円玉
C = int(input()) #50円玉
X = int(input()) #この値にする合計を求める

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

Submission status: Wrong Answer

Solution code:
A = int(input()) #500円玉
B = int(input()) #100円玉
C = int(input()) #50円玉
X = int(input()) #この値にする合計を求める

count = 0
a = -1
b = -1
c = -1
while a <= A:
    a += 1
    while b <= B:
        b +=1
        while c <= C:
            c +=1
            total = 500 * a + 100 * b + 50 * c
            if total == X:
                count += 1
print(count)

Submission status: Wrong Answer

Solution code:
A = int(input()) #500円玉
B = int(input()) #100円玉
C = int(input()) #50円玉
X = int(input()) #この値にする合計を求める

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

Submission status: Wrong Answer

Solution code:
a=int(input())#500
b=int(input())#100
c=int(input())#50
n=int(input())
co=0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      go=500*i+100*j+50*k
      print(go)
      if go==n:
        co+=1
print(co)

Submission status: Wrong Answer

Solution code:
a=int(input())#500
b=int(input())#100
c=int(input())#50
n=int(input())
co=0
for i in range(a):
  for j in range(b):
    for k in range(c):
      go=500*i+100*j+50*c
      if go==n:
        co+=1
print(co)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
x_dash=x//50
cnt=0
for i in range(1,a+1):
  for j in range(1,b+1):
    k=x_dash-10*i-2*j
    if 0<=k<=c:
      cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
s=50*c
print(len([1 for i in range(a+1) for m in range(b+1) if 0<=x-500*i+100*m<=s]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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*a + 100*b + 50*c == x:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
cnt = 0
for a in range(41):
  for b in range(201):
    for c in range(401):
      if 500*a + 100*b + 50*c == X:
        cnt += 1
print(cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#A:500, B:100, C:50
A = int(input().strip())
B = int(input().strip())
C = int(input().strip())
X = int(input().strip())

count = 0

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

print(count)

Submission status: Wrong Answer

Solution code:
#

import sys
input=sys.stdin.readline

def main():
    A=int(input())
    B=int(input())
    C=int(input())
    X=int(input())
    cnt=0
    for i in range(A):
        for j in range(B):
            if 0<=X//50-10*i-2*j<=C:
                cnt+=1
    print(cnt)
    
if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np
# 複数個格納
# A B = map(int, input().split())
# 行列化
# A = np.array(A)
# A=A.reshape(1,-1)
# A=A.T
#行列の比較
#C=((A%2 == vector0).all())


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

gohyaku=(np.arange(0,500*A+1,500)).reshape(1,-1)
hyaku=(np.arange(0,100*B+1,100)).reshape(1,-1)
goju=(np.arange(0,50*C+1,50)).reshape(1,-1)


gohyaku1=X-(gohyaku+hyaku.T)
count=0
for i in range(A+1):
    for k in range(B+1):
        if 0 <= gohyaku1[k,i] <= 2500:
            count=count+1

print(count)

Submission status: Wrong Answer

Solution code:
import numpy as np
# 複数個格納
# A B = map(int, input().split())
# 行列化
# A = np.array(A)
# A=A.reshape(1,-1)
# A=A.T
#行列の比較
#C=((A%2 == vector0).all())


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

gohyaku=(np.arange(0,500*A+1,500)).reshape(1,-1)
hyaku=(np.arange(0,100*B+1,100)).reshape(1,-1)
goju=(np.arange(0,50*C+1,50)).reshape(1,-1)


gohyaku1=X-(gohyaku+hyaku.T)
count=0
print(gohyaku1)
for i in range(A+1):
    for k in range(B+1):
        if 0 <= gohyaku1[k,i] <= 2500:
            count=count+1

print(count)

Submission status: Wrong Answer

Solution code:
import numpy as np
# 複数個格納
# A B = map(int, input().split())
# 行列化
# A = np.array(A)
# A=A.reshape(1,-1)
# A=A.T
#行列の比較
#C=((A%2 == vector0).all())


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

gohyaku=(np.arange(0,500*A+1,500)).reshape(1,-1)
hyaku=(np.arange(0,100*B+1,100)).reshape(1,-1)
goju=(np.arange(0,50*C+1,50)).reshape(1,-1)


gohyaku1=X-(gohyaku+hyaku.T)
count=0

for i in range(A):
    for k in range(B):
        if 0 <= gohyaku1[k,i]/50 <= C:
            count=count+1

print(count)