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: Accepted

Solution code:
# coding: utf-8
# Your code here!
import itertools

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

num=0

for i, j, k in itertools.product(range(A+1), range(B+1), range(C+1)):
    if i*500 + j*100 + k*50 == X:
        num += 1
#        print(i,j,k)

print(num)

Submission status: Accepted

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 == 500 * i + 100 * j + 50 * k:
                ans += 1
print(ans)

Submission status: Accepted

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):
            coin = i * 500 + j * 100 + k * 50
            if coin == x:
                ans+=1
print(ans)

Submission status: Accepted

Solution code:
f = lambda :int(input())
A = f()
B = f()
C = f()
X = f()
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
print(ans)

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
x = X//50
ans=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:
        ans+=1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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 (i * 500 + j * 100 + k * 50) == X:
                ans += 1

print(ans)

Submission status: Accepted

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==500*i+100*j+50*k:
                count=count+1
            

print(count)

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
C=int(input())
X=int(input())
c=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:
                c+=1
                
print(c)

Submission status: Accepted

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):
        res = x - (500 * i + 100 * j)
        # print(i, j, res)
        if res >= 0 and res % 50 == 0 and res // 50 <= c:
            ans += 1

print(ans)

Submission status: Accepted

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

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

print ans

Submission status: Accepted

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

cnt = 0
for f in range(0, A+1):
    for o in range(0, B+1):
        for hf in range(0, C+1):
            s = f*500 + o*100 + hf*50
            if s == X : cnt +=1

print(cnt)

Submission status: Accepted

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

ct = 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:
                ct += 1

print ct

Submission status: Accepted

Solution code:
import itertools
a = int(input())
b = int(input())
c = int(input())
x = int(input())
R = [i for i in range(60)]
num = 0
for i, j, k in itertools.product(R[:a + 1], R[: b + 1], R[: c + 1]):
    if 500 * i + 100 * j + 50 * k == x:
        num += 1

print(num)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# coding=utf-8

import sys

a = int(sys.stdin.readline().strip())
b = int(sys.stdin.readline().strip())
c = int(sys.stdin.readline().strip())
x = int(sys.stdin.readline().strip())
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: Accepted

Solution code:
a, b, c, x = [input() for _ in xrange(4)]
cnt = 0
for d in xrange(a + 1):
    for e in xrange(b + 1):
        for f in xrange(c + 1):
            if 500 * d + 100 * e + 50 * f == x:
                cnt += 1
print cnt

Submission status: Accepted

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

Submission status: Accepted

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())

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

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

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

Submission status: Runtime Error

Solution code:
a,b,c,x=map(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 k*50+j*100+i*500==x:
                count+=1
                
print(count)

Submission status: Runtime Error

Solution code:
a,b,c,x=map(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 k*50+j*100+i*500==x:
                count+=1
                
print(count)

Submission status: Runtime Error

Solution code:
a,b,c,x=map(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 k*50+j*100+i*500==x:
                count+=1
                
print(count)

Submission status: Runtime Error

Solution code:
# distutils: language=c++
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# cython: infer_types=True
# cython: cdivision=True
# False:Cython はCの型に対する除算・剰余演算子に関する仕様を、(被演算子間の符号が異なる場合の振る舞いが異なる)Pythonのintの仕様に合わせ、除算する数が0の場合にZeroDivisionErrorを送出します。この処理を行わせると、速度に 35% ぐらいのペナルティが生じます。 True:チェックを行いません。



# define 
ctypedef long long LL

# 読み込みはpython側で行う
import sys
readline = sys.stdin.buffer.readline
read = sys.stdin.readline #文字列読み込む時はこっち

cdef LL a_int(): return int(readline())

cdef LL i,j,k,_


cdef LL A=a_int()
cdef LL B=a_int()
cdef LL C=a_int()
cdef LL X=a_int()

# 愚直にシミュレーション
cdef LL a,b,c,ans
for a in range(A+1):
    for b in range(B+1):
        for c in range(C+1):
            ans += (500*a + 100*b + 50*c == X)
print(ans)

Submission status: Runtime Error

Solution code:
a , b, c , x = map(int, input().split())
count = 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:
                count += 1

print(count)

Submission status: Runtime Error

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,min([a+1,a1+1])):
    a = 500*i
    if a == d:
        coun = coun +1
        break
    for j in range(0,min([b+1,b1+1-5*i])):
        s = a + 100*j
        if s == d :
            coun = coun +1
            break
        for k in range(0,min([c+1,c1+1-10*i-2*j]):
            v = s + 50*k
            if v == d :
                coun = coun+1
                break
print(coun)

Submission status: Runtime Error

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,min([a+1,a1+1])):
    a = 500*i
    if a == d:
        coun = coun +1
        break
    for j in range(0,min([b+1,b1+1-5*i])):
        s = a + 100*j
        if s == d :
            coun = coun +1
            break
        for k in range(0,min([c,c1+1-10*i-2*j]):
            v = s + 50*k
            if v == d :
                coun = coun+1
                break
print(coun)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())/50
ans=0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i*10+j*2+k=x:
                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 500*a+100*b+50*c=x:
        count+=1
print(count)

Submission status: Runtime Error

Solution code:
a,b,c,x = map(int,open(0).read().split())

ans = 0 
counta = 0

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, c, x = map(int, open(0).read().split())
ans = 0
for i in range(x // a + 1):
  for j in range(x // b + 1):
    if (x - (a * i + b * j)) % c == 0
        ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input() # 500
b = input() # 100
c = input() # 50
x = 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: Runtime Error

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

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      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: Runtime Error

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 range(y):
                if 500*h+100*l+50*o==u:
                    cnt+=1
    return cnt
print(countcourse(a,b,c,x))

Submission status: Runtime Error

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 y range(y):
        if 500*h+100*l+50*y==u:
          cnt+=1
  return cnt
print(countcourse(a,b,c,x))

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
aa=x//a
bb=x//b
cc=c//c
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: Runtime Error

Solution code:
cnt = 0
for a in range(A+1):
#     _a = a*500
    for b in range(B+1):
#         _b = b*100 + _a
#         if _b > X: break
        for c in range(C+1):
#             _c = c*50 + _a + _b
#             if _c > X: break
#             if _c == X:
            if (a*500 + b*100 + c*50) == X:
                cnt+=1
print(cnt)

Submission status: Runtime Error

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

cnt = 0
for a in range(min([A,-(-X//500)])+1):
  _tmp = a*500
  if _tmp > x: break
  for b in range(min([B,-(-X//100)])+1):
	_tmp += b*100
	if _tmp > x: break
    for c in range(min([C,-(-X//50)])+1):
	  _tmp += c*50
	  if _tmp > x: break
	  if _tmp == X:
        cnt+=1
print(cnt)

Submission status: Runtime Error

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

for (i = 0; i <= a[0]; i++) :
  for (j = 0; j <= a[1]; j++) :
    for (k = 0; k <= a[2]; k++) :
      sum = 500*i + 100*j + 50*k
      if sum == a[3] :
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(4)]
count = 0
y = a[3]
i = y / 500; if i > a[0] : i = a[0]; y -= i * 500
j = y / 100; if j > a[1] : j = a[1]; y -= j * 100
k = y /  50; if k > a[2] : k = a[2]; y -= k * 50
if (y == 0) :
  count += 1
  if i > 0 :
    while (i > 0 and j + 5 <= a[1]) :
      i -= 1
      j += 5
      tmp1 = j
      tmp2 = k
      count += 1
      while (tmp1 > 0 and tmp2 + 2 <= a[2]) :
        tmp1 -= 1
        tmp2 += 2
        count += 1
      tmp1 = j
      tmp2 = k
  elif i == 0 and j > 0:
    while (j > 0 and k + 2 <= a[2]) :
        j -= 1
        k += 2
        count += 1

print(count)

Submission status: Runtime Error

Solution code:
a = [int(input()) for i in range(4)]
count = 0
y = a[3]
i = y / 500; if i > a[0] : i = a[0]; y -= i * 500
j = y / 100; if j > a[1] : j = a[1]; y -= j * 100
k = y /  50; if k > a[2] : k = a[2]; y -= k * 50
if (y == 0) :
  count += 1
  while (i > 0 && j + 5 < a[1]) :
    i -= 1
    j += 5
    tmp1 = j
    tmp2 = k
    count += 1
    while (tmp1 > 0 && tmp2 + 2 < a[2]) :
      tmp1 -= 1
      tmp2 += 2
      count += 1
    tmp1 = j
    tmp2 = k

print(count)

Submission status: Runtime Error

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

Solution code:
abc = [int(input()) for i in range(3)]
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:
using namespace std;

int main() {
  int A, B, C, X;
  cin >> A >> B >> C >> X;
  int res = 0;
  for (int a = 0; a <= A; ++a) {
    for (int b = 0; b <= B; ++b) {
      for (int c = 0; c <= C; ++c) {
        int total = 500*a + 100*b + 50*c; // 合計金額
        if (total == X) ++res; // 合計金額が X に一致したら答えをインクリメント
      }
    }
  }
  cout << res << endl;
}

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;

int main() {
  int A, B, C, X;
  cin >> A >> B >> C >> X;
  int res = 0;
  for (int a = 0; a <= A; ++a) {
    for (int b = 0; b <= B; ++b) {
      for (int c = 0; c <= C; ++c) {
        int total = 500*a + 100*b + 50*c; // 合計金額
        if (total == X) ++res; // 合計金額が X に一致したら答えをインクリメント
      }
    }
  }
  cout << res << endl;
}

Submission status: Runtime Error

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

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

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

for c in range(0,C+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
  for n in range(0,d+1):
    if B-e-5*n >= 0:
      i=i+1
  for m in range(0,e+5*i):
    if C-f-2*m >= 0:
      i=i+1
  print(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
s=int(input())
n=0
for x in range(a):
  for y in range(b):
    for z in range(c):
      if 500x+100y+50z==s:
        n=n+1
print(n)

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 500*i+100*j+50*k==x:
                ans+=1
print(ans)

Submission status: Runtime Error

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 f(x,0,a,b,c)

Submission status: Runtime Error

Solution code:
A,B,C,D = map(int, input().split())
print(sum(500*i+100*j+50*k==D for i in range(A+1) for j in range(B+1) for k in range(C+1)))

Submission status: Runtime Error

Solution code:
A,B,C,D = map(int, input().split())
print(sum(500*i+100*j+50*k==d for i in range(A+1) for j in range(B+1) for k in range(C+1)))

Submission status: Runtime Error

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

for a in range(A+1):
    a_total=a*500
    for b in range(B+1):
        b_total=b*100
        for c in range(C+1):
            c_total=c*50
            total_amount=(a_total+b_total+c_total)
            if X==total_amount:
                count=counter+1
print(count)

Submission status: Runtime Error

Solution code:
a, b, c, x = map(int, [input() fot z 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, b, c, x = map(int, [input() fot 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:
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] 

    X500 = int(X) - i*500

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

        X100 = X - j*100

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

            X50 = X -k*50

            if X50 == 0:
                n += 1

print(n)

Submission status: Runtime Error

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

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:
        ans += 1

print(ans)

Submission status: Runtime Error

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: 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 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())
count = 0
for a in range(A + 1):
    for b in range(B + 1):
        fo 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,b,c,d = map(int, input().open(0).split())
print(sum(500*x+100*y+50*z==d for x in range(a+1) for y in range(b+1) for z in range(c+1)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = [(i, j, k) 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]
print(len(ans))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
counts = 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:
                counts += 1
print(counts)

Submission status: Runtime Error

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

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

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = list()
for i in range(N):
　　A.append(int(input()))
print(len(set(A)))

Submission status: Runtime Error

Solution code:
N = int(input())
A = list()
for i in range(N):
  A.append(int(input()))
print(len(set(A)))

Submission status: Runtime Error

Solution code:
a, b, c, x = list(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 500 * i + 100 * j + 50 * k == x:
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
lis = list(map(int,input().split()))
 
A, B= 0,0
for i in range(N):
    if i % 2 == 0:
        A += max(lis)
        lis.remove(max(lis))
    else:
        B += max(lis)
        lis.remove(max(lis))
 
print(A-B)

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):
  for j in range(B):
    for k in range(C):
      if(i * 500 + j * 100 + k * 50 === X):
        count += 1

print(count)

Submission status: Runtime Error

Solution code:
five = int(input())
hand = int(input())
fives = int(input())
ans = int(input())
tmp = 0

for i in range(five):
  for j in range(hand):
    for k in range(fives):
   		ask = 500 * (i+1) + 100 * (j+1) + 50 * (k+1) 
  		if ask == ans:
       		tmp = tmp + 1

Submission status: Runtime Error

Solution code:
five = int(input())
hand = int(input())
fives = int(input())
ans = int(input())
tmp = 0

for i in range(five):
  for j in range(hand):
    for k in range(fives):
   		ask = 500 * i + 100 * j + 50 *k 
  		if ask == ans:
       		tmp = tmp + 1

Submission status: Runtime Error

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 500*i+100*j+50*k == x:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
if all(X//500<=A X%500<=(100*B+50*C) (X%500)%100<=C*50):
    print

Submission status: Runtime Error

Solution code:
a=[]
for i in range(3):
    a.append(int(input()))
x=int(input())
ans+=1

for i in range(a[0]):
    for j in range(a[1]):
        for k in range(a[2]):
            if i*500+j*100+k*50==x:
                ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
A, B, C, X [int(inpit()) for i in range(4)]
print(sum(500 * a + 100 *b + 50 *c == X) for a in range(A+1) for b in range(B + 1) for c in range(C + 1)))

Submission status: Runtime Error

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

count = 0

for i_a in range(a):
  for i_b in range(b):
    for i_c in range(c):
      if 500*a + 100*b + 50*c == x:
        count += 1
        
print(count)

Submission status: Runtime Error

Solution code:
A,B,C,X = [int(input()) for _ in range(4)]
count = 0
for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            if i+j+k = X
            count += 1
print(count)

Submission status: Runtime Error

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

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

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%(500*i + 100*j + 50*k) == 0 :
                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 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) == 0 :
                count += 1

print(count)

Submission status: Runtime Error

Solution code:
a,b,c x = map(int, open(0))
print(sum( 500*i + 100*l + 50*k == x for i in range(a+1) for j in range(b+1) for k in range(c+1)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B,C,x=[int(input()) for _ in range(4)]
a=x//500
b=x//100
c=x//50
ans=0
for s in range(1,a+1):
  for t in range(1+b+1):
    u=(x-500*s-100*t)//50
    if all(0<=s<=A and 0<=t<=B and 0<=u<=C):
      ans+=1
print(ans)

Submission status: Runtime Error

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

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

print(num)

Submission status: Runtime Error

Solution code:
A, B, C, X = [int(input()) for i in range(4)]
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,B,C,X = int(input()) for i in range(4)
print(sum(500*a+100*b+50*c == X for a in range(A+1) for b in range(B+1) for c in range(C+1)))

Submission status: Runtime Error

Solution code:
N,A,B=map(int, input().split())
print(sum(i for i in range(1,N+1) if A <= sum(map(int,str(i)))<=B))

Submission status: Runtime Error

Solution code:
X = int(input())
A = int(input())
B = int(input())
C = int(input())
cnt = 0
for i in range(A):
    for j in range(B):
        for k in range(C):
            if (i+j+h) == X:
                cnt = cnt + 1
print(cnt)

Submission status: Runtime Error

Solution code:
X = int(input())
A = int(input())
B = int(input())
C = int(input())
cnt = 0
for(i in range(A)):
    for(j in range(B)):
        for(k in range(C)):
            if(i+j+h == X):
                cnt = cnt + 1
print(cnt)

Submission status: Runtime Error

Solution code:
a,b,c,x = input().strip().split()
a,b,c,x = [int(a),int(b),int(c),int(x)]
counter = 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
        for k in range(c+1):
            if 500*i+100*j+50*k == x:
                counter += 1
print(counter)

Submission status: Runtime Error

Solution code:
a,b,c,x = input().strip().split()
a,b,c,x = [int(a),int(b),int(c),int(x)]
counter = 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
        for k in range(c+1):
            if 500*i+100*j+50*k == x:
                counter += 1
print(counter)

Submission status: Runtime Error

Solution code:
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "1\n",
      "1\n",
      "1\n",
      "0\n"
     ]
    }
   ],
   "source": [
    "A = int(input())\n",
    "B = int(input())\n",
    "C = int(input())\n",
    "X = int(input())\n",
    "res=0\n",
    "for  i in range(A + 1):\n",
    "    for j in range(B + 1):\n",
    "        for k in range(C + 1):\n",
    "            if 500*i + 100*j + 50*k == X:\n",
    "                res += 1\n",
    "print(res)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

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):
  for j in range(B):
    for j in range(C):
      if 500*i + 100*j + 50*k == X:
        count += 1
print(count)