Problem p03448 (python)

Fixed submission:
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 = divmod (X - 500 * i - 100 * j ,50)
    if mod == 0 and q <= C:count += 1    
print(count)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
A = int(input()) #500
B = int(input()) #100
C = int(input()) #50
X = int(input())
count = 0 //初期値
           
#全件走査

Buggy submission (verdict: Runtime Error):
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

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)