Problem:


Score : 100 points

Problem Statement

There are H rows and W columns of white square cells.

You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.

How many white cells will remain?

It can be proved that this count does not depend on what rows and columns are chosen.

Constraints

All values in input are integers.

1 \leq H, W \leq 20

1 \leq h \leq H

1 \leq w \leq W

Input

Input is given from Standard Input in the following format:

H W
h w

Output

Print the number of white cells that will remain.

Sample Input 1

3 2
2 1

Sample Output 1

1

There are 3 rows and 2 columns of cells. When two rows and one column are chosen and painted in black, there is always one white cell that remains.

Sample Input 2

5 5
2 3

Sample Output 2

6

Sample Input 3

2 4
2 4

Sample Output 3

0



Sample input:
3 2
2 1


Sample output:
1

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h*W-w*H+h*W)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*w+W*h-h*w)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h*w)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
print((a-1) * (b-1))

Submission status: Wrong Answer

Solution code:
a,b=list(map(int,input().split()))
c,d=list(map(int,input().split()))
x=a*b
print(x-a*c-b*d+c*d)

Submission status: Wrong Answer

Solution code:
a,b=list(map(int,input().split()))
c,d=list(map(int,input().split()))
x=a*b
print(x-a*c-b*d)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-w) * (W-w))

Submission status: Wrong Answer

Solution code:
HW_list =[list(map(int,input().split())) for i in range(2)]
print(HW_list[0][0]*HW_list[0][1]-HW_list[1][0]*HW_list[1][1])

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

ans = H*W - (H*h + W*w - h*w)

print(ans)

Submission status: Wrong Answer

Solution code:
h, w = [int(i) for i in input().split()]
_ = input()
 
print(h * w - (h + w - 1))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H * W * (h / H) * (w / W))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-H*h-W*w+h*w)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print((H-h)*(W*w))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
x = H*W- h*w
print(x)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
x = (H*W)-(h*w)
print(x)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

print((H*W)-(h*w))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print((H*W)-(h*w))

Submission status: Wrong Answer

Solution code:
H,W = [int(x) for x in input().split()]
h,w = [int(x) for x in input().split()]

ans = H*w + h*W - h*w

print(ans)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W - h*w)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

A = H * W #マスの数
A = A - (h * H) #行を黒塗り
A = A - ((W - h) * w) #列を黒塗り

print(A)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque
import sys

INF = float('inf')
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


h1, w1 = LI()
h, w = LI()
ans = max(0, h * w)
print(ans)

Submission status: Wrong Answer

Solution code:
x = [list(map(int,input().split())) for i in range(2)]
print((x[1][1]-x[1][0])*(x[0][1]-x[0][0]))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
ka=h*w
print(H*W-ka)

Submission status: Wrong Answer

Solution code:
# input
H, W = map(int, input().split())
h, w = map(int, input().split())

# check
if (H, W) == (h, w):
    print(0)
else:
    print(H * W - ((H * h) + (W * w) - (h * w)))

Submission status: Wrong Answer

Solution code:
# input
H, W = map(int, input().split())
h, w = map(int, input().split())

# check
print(H * W - ((H * h) + (W * w) - (h * w)))

Submission status: Wrong Answer

Solution code:
# input
H, W = map(int, input().split())
h, w = map(int, input().split())

# check
print(H * W - ((H * h) + (W * w) - (h + w)))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
print((H-1)*(W-1))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print((H*W)-(h*w))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
if h==H or w==W:
    print(0)
else:
    print(int(H*W*((H-h)/H)*((W-w)/W)))

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
c,d = map(int, input().split())
 
print((a - b) * (c - d))

Submission status: Wrong Answer

Solution code:
A, a = map(int, input().split())
B, b = map(int, input().split())
 
print((A - a) * (B - b))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
TOTAL = H * W
total = h * w
result = TOTAL - total
print(result)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
b = list(map(int, input().split()))
H = a[0]
W = a[1]
h = b[0]
w = b[1]
k = H * h - W * w
print(k)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())

print(H*W-h*W+H*w-h*w)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())

print(h*W+H*w-h*w)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

print(H*W-h*H-w*W+h*w)

Submission status: Wrong Answer

Solution code:
data = input().rstrip().split()
mat=[[1 for i in range(int(data[1]))] for j in range(int(data[0]))]
n = input().rstrip().split()
print(mat)
for i2 in range(int(n[0])):
  for k in range(int(data[1])):
    mat[i2][k]=0
print(mat)
for j2 in range(int(n[1])):
  for k in range(int(data[0])):
    mat[k][j2]=0
ans=0
for l in range(len(mat)):
  ans+=sum(mat[l])
print(ans)

Submission status: Wrong Answer

Solution code:
p,q= input().split()
a,b =(int(p), int(q))
P,Q= input().split()
A,B =(int(P), int(Q))
print(int(a*b - A*B))

Submission status: Wrong Answer

Solution code:
H,W,h,w=map(int,open(0).read().split())
print(W*h+H*w-h*w)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(h*W+H*w-h*w)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print((H-h)*(h-w))

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
h, w = map(int, input().split())
print(h * W + w* H - h * w)

Submission status: Wrong Answer

Solution code:
import numpy as np


H, W = map(int, input().split())
h, w = map(int, input().split())
table = np.array([[0 for i in range(W)] for j in range(H)])
ans = 0
for i in range(h):
    table[i] += 1
for i in range(H):
    table[i][:w] += 1
    ans += sum(table[i])
print(table)
print((H*W)-(ans-(h*w)))

Submission status: Wrong Answer

Solution code:
# Your code here!
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*h-W*w)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print((H-h)*(w))

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
_1,_2=map(int,input().split())
print((h-1)*(w-1))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W - (h*W + w*H))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h*W-w*H+2*h*w)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h-w+1)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H+W-h-w+1)

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())
c, d = (int(i) for i in input().split())

print(a*b - c*a - d*b + c*d)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print((h-H)*(W-w))

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
a,b=map(int,input().split())
print(A*B-((A-a)*b+(B-b)*a))

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
a,b=map(int,input().split())
print(a*b-((A-a)*b+(B-b)*a))

Submission status: Wrong Answer

Solution code:
p=[list(map(int,input().split())) for i in range(2)]

(p[0][0]-p[1][0])*(p[0][1]-p[1][1])

Submission status: Wrong Answer

Solution code:
H,W=map(int, input().split())
h,w=map(int, input().split())

(H-h)*(W-w)

Submission status: Wrong Answer

Solution code:
H,W=map(int, input().split())
h,w=map(int, input().split())

H*W-h*W-w*H+h*w

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b - c*d)

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
h1,w1 = map(int, input().split())
sum = H*h1
sum1 = W*w1
sum2 = h1*w1
ans = sum+sum1-sum2
print(H*W-ans)

Submission status: Wrong Answer

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

if a%2 == 0 and b%2 == 0:
    ans = b^((b-a)//2)%2
elif a%2 == 0 and b%2 != 0:
    ans = ((b-a+1)//2)%2
elif a%2 != 0 and b%2 == 0:
    ans = a^b^((b-1-a)//2)%2
else:
    ans = a^(b-a//2)%2

print(ans)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(h*W + H*w - h*w)

Submission status: Wrong Answer

Solution code:
H, W = map( int, input().split() )
print( (H-1) * (W-1) )

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h*H-w*W+h*w)

Submission status: Wrong Answer

Solution code:
H, W = [int(x) for x in input().split()]
h, w = [int(x) for x in input().split()]

print(H*W - h*w)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h-w+1)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h*w)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
print((a-b)*(c-d))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-H*w-W*h)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print((H * W) - (h * H + w * W - h * w))

Submission status: Wrong Answer

Solution code:
from sys import stdin
H, W = [int(x) for x in stdin.readline().rstrip().split()]
h, w = [int(x) for x in stdin.readline().rstrip().split()]
print((H * W) - (h * w))

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

ans=(H*W)-(H*w)-(w*H-h*w)
print(ans)

Submission status: Wrong Answer

Solution code:
S = list(map(int, input().split()))
s = list(map(int, input().split()))

origin= S[0]*S[1]
deduction = (S[1]*s[0])+((S[1]-s[0])*s[1])

ans= origin - deduction
print(ans)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-(H-h)*(W*w))

Submission status: Wrong Answer

Solution code:
h, w=map(int, input().split())
H, W=map(int, input().split())
print((H-h)*(W*w))

Submission status: Wrong Answer

Solution code:
h, w=map(int, input().split())
H, W=map(int, input().split())
print(H*W-h*w)

Submission status: Wrong Answer

Solution code:

def to_bin(n):
  s = ''
  while n > 0:
    s += str(n%2)
    n //= 2
  return s[::-1]

def xor(s1, s2):
  s1 = '0'*(len(s2)-len(s1)) + s1
  result = ''
  for i in range(len(s1)):
    if s1[i] == s2[i]:
      result += '0'
    else:
      result += '1'
  return result

def to_den(s):
  s = s[::-1]
  total = 0
  for i in range(0, len(s)):
    total += 2**i*int(s[i])
  return total

A, B = map(int, input().split())
if A == B:
  print(A)
else:
  cur = xor(to_bin(A), to_bin(A+1))

  for i in range(A+2, B+1):
    s = to_bin(i)
    cur = xor(cur, s)

  print(to_den(cur))

Submission status: Wrong Answer

Solution code:

def to_bin(n):
  s = ''
  while n > 0:
    s += str(n%2)
    n //= 2
  return s[::-1]

def xor(s1, s2):
  s1 = '0'*(len(s2)-len(s1)) + s1
  result = ''
  for i in range(len(s1)):
    if s1[i] == s2[i]:
      result += '0'
    else:
      result += '1'
  return result

def to_den(s):
  s = s[::-1]
  total = 0
  for i in range(0, len(s)):
    total += 2**i*int(s[i])
  return total

def main():
  A, B = map(int, input().split())
  if A == B:
    print(A)
  else:
    cur = xor(to_bin(A), to_bin(A+1))

    for i in range(A+2, B+1):
      s = to_bin(i)
      cur = xor(cur, s)

    print(to_den(cur))

main()

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b-c*d)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-w)*(W-w))

Submission status: Wrong Answer

Solution code:
from sys import stdin

H,W = [int(x) for x in stdin.readline().rstrip().split()]
h,w = [int(x) for x in stdin.readline().rstrip().split()]

print(H*W-h*W+H*w-h*w)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
def XOR(start,end):
  xor =  start
  if end-start < 10:
      for i in range(a+1,b+1):
        xor = xor^i
        #print('end={0},xor={1}'.format(i,xor))
      print(xor)
  else:
    if start%2==0:
      new_start = start-1
    else:
      new_start = start
    
    if (end - new_start)%4==0:
      if start%2==0:
        print(0)
      else:
        print(start)
    elif (end - new_start)%4==1:
      if start%2==0:
        print(end)
      else:
        print(start^end)
    elif (end - new_start)%4==2:
      if start%2==0:
        print((end-1)^end)
      else:
        print(start^(end-1)^end)
    else:
      if start%2==0:
        print((end-2)^(end-1)^end)
      else:
        print(start^(end-2)^(end-1)^end)

if __name__ ==  '__main__':
  XOR(a,b)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-(H*h+W*w-h*w))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*w+W*h-h*w)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*h+W*w-h*w)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print(2*W+w*H-w*h)

Submission status: Wrong Answer

Solution code:
hh,ww = map(int, input().split())
h, w = map(int, input().split())
s = hh*ww - h*ww - hh*w + hh*ww
print(s)

Submission status: Wrong Answer

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

def brute(A, B):
    ret = 0
    i = 1
    while A <= B:
        ret ^= A
        A += 1
    return ret

def better(A, B):
    if A == B:
        return A
    if (B - A) % 4 == 0:
        return B
    return A ^ better(A + 1, B)

print(better(A, B))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

print(H*W-h*w)

Submission status: Wrong Answer

Solution code:
H,W =map(int,input().split())
h,w =map(int,input().split())
print(H*W-h*W-w*H+h*W)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W - h*w - w*H + h*w)

Submission status: Wrong Answer

Solution code:
h,w = map(int,input().split())
print((h-1)*(w-1)-1)

Submission status: Wrong Answer

Solution code:
hP,wP = map(int,input().split())
hC,wC = map(int,input().split())

ans = hP * wP
ans -= (hP+wP-1)

print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
c,d = map(int, input().split())
i=a*b
print(i-(a-c)*(b-d))

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())
print(H*W-h*w)

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())
print(H*w+h*W-h*w)

Submission status: Wrong Answer

Solution code:
H, W = map(int,input().split())
h,w = map(int,input().split())

print(H*W - H*h - (H-h)*w)

Submission status: Wrong Answer

Solution code:
H, W =map(int,input().split())
h, w =map(int,input().split())
print(H*W-h-w+1)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())

print(H*w+W*h-h*w)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H-h*W-w)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H - h) + (W - w))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(h * W + H * w - h * w)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print((H-1)*(w-1)-(h-1)*(w-1))

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
b=list(map(int,input().split()))
print((a[0]-a[1])*(b[0]-b[1]))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h*W-w*h+h*w)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print(H*W-(h+w-1))

Submission status: Wrong Answer

Solution code:
List = [list(map(int,input().split())) for i in range(2)]
print((List[0][0]-List[1][0])*(List[0][1]*List[1][1]))

Submission status: Wrong Answer

Solution code:
List = [list(map(int,input().split())) for i in range(2)]
print((List[0][0]*List[0][1])-(List[1][0]*List[1][1]))

Submission status: Wrong Answer

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

print((a * b) - (a * c) - (b * d) + (c * d))

Submission status: Wrong Answer

Solution code:
h, w = map(int,input().split())
h1, w1 = map(int,input().split())
print(h*w - (w*h1 + h*w1 - h1 - w1 +1))

Submission status: Wrong Answer

Solution code:
h, w = map(int,input().split())
h1, w1 = map(int,input().split())
print(h*w - (h + w - 1))

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

print(H*W -(h+w-h*w))

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
h, w = map(int, input().split())
print((h-h)*(W-w))

Submission status: Wrong Answer

Solution code:
H,W=(int(x) for x in input().split())
h,w=(int(x) for x in input().split())

print((H*W)-(h*w))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print(int(H*W-h-w+h*w))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(h*W + w*H -h*w)

Submission status: Wrong Answer

Solution code:
a,s=map(int,input().split())
f,g=map(int,input().split())
print(a*s-f*g)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-(W*h)+((H*w)-(h*w)))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
res = H * W - h * w
print(res)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b+c*d-a*c-b*d)

Submission status: Wrong Answer

Solution code:
uh, uw = map(int, input().split())
h, w = map(int, input().split())
print(int((uh*uw) - (uh*h) - (uw*w) + (h*w)))

Submission status: Wrong Answer

Solution code:
uh, uw = map(int, input().split())
h, w = map(int, input().split())
print((uh*uw) - (uh*h) - (uw*w) + (h*w))

Submission status: Wrong Answer

Solution code:
H,W =map(int,input().split()) 
h,w =map(int,input().split()) 
print((H-w)*(W-w))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(min([(H-h) * (W-w), 0]))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print(H*W-(H*h+W*w-h*w))

Submission status: Wrong Answer

Solution code:
H,W=map(int, input().split())
h,w=map(int, input().split())

print (H*W - (H-h)*(W-w))

Submission status: Wrong Answer

Solution code:
H,W=map(int, input().split())
h,w=map(int, input().split())

print (H*W - H*h*w)

Submission status: Wrong Answer

Solution code:
H,W=map(int, input().split())
h,w=map(int, input().split())

print (H*W - (h*w))

Submission status: Wrong Answer

Solution code:
H,W=map(int, input().split())
h,w=map(int, input().split())

print ((H-h)*w + (W-w)*(h-1))

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

print(H*W-h-w+1)

Submission status: Wrong Answer

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

def xor_sum(x):
    ans = 0 
    if x % 2 == 1:
        if ((x + 1) // 2 )%2 ==0:
            ans = 0
        else:
            ans = 1
    else:
        if x%4 == 0:
            ans = x
        else:
            ans = 1^x
    return ans

print(xor_sum(a-1)^xor_sum(b))

Submission status: Wrong Answer

Solution code:
def main():
    W, H = map(int,input().split())
    h, w = map(int,input().split())

    point = W * H

    delete_h = h * W
    delete_w = w * H

    kaburi = h * w

    ans = point - (delete_h + delete_w - kaburi)
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    W, H = map(int,input().split())
    h, w = map(int,input().split())

    point = W * H

    delete_h = h * W
    delete_w = w * H

    kaburi = h * w

    ans = point - (delete_h + delete_w - kaburi)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(int(H*W-h*W+w*H-h*w))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(int((H-h)*(W+w)))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

print(H*W - h*w)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

print(H*W - (h*W + H*w - min(h,w)))

Submission status: Wrong Answer

Solution code:
H,W=list(map(int,input().split()))
h,w=list(map(int,input().split()))

answer=(H*h)-(W*w)

print(answer)

Submission status: Wrong Answer

Solution code:
H,W=list(map(int,input().split()))
h,w=list(map(int,input().split()))

answer=(H-h)-(W-w)

print(answer)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

white = int(H * W)
black = int(H*h + W*w)
white = white - black + h*w

print(white)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

white = int(H * W)

white -= h * w

print(white)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
l=[]
ldi=[]
ans=""

a=A
while a<=B:
    l.append(format(a, 'b'))
    a+=1

i=0
while i<=B-A:
    ldi.append(l[i].zfill(len(format(B, 'b'))))
    i+=1

j=0
while j<=len(format(B, 'b'))-1:
    k=0
    p=0
    while k<=B-A:
        if ldi[k][j]=="1":
            p+=1
        else:
            pass
        k+=1
    if p%2==1:
        ans=ans+"1"
    else:
        ans=ans+"0"
    j+=1

print(int(ans, 2))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print(H*W-(h*H+w*W-h-w))

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    list_1=input("数字を入力：").split()
    H=int(list_1[0])
    W=int(list_1[1])

    list_2=input("数字を入力：").split()
    h=int(list_2[0])
    w=int(list_2[1])
    
    Ans = (H-h)*(W-w)
    print(Ans)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    list_1=input("数字を入力：").split()
    H=int(list_1[0])
    W=int(list_1[1])

    list_2=input("数字を入力：").split()
    h=int(list_2[0])
    w=int(list_2[1])
    
    Ans = (H-h)*(W-w)
    print(Ans)
    pass

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(h*W+H*w-h*w)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
ans = H * W - h * H - w * W + h * w
print(ans)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W - (W*h + H*w - (h+w-1)))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
 
total = H*W
line = (H - h) * w
print(total - line)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

total = H*W
line = (H - h) * W
print(total - line)

Submission status: Wrong Answer

Solution code:
H,W, = (int(i) for i in input().split())
h,w = (int(i) for i in input().split())
print((H-W)*(h-w))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
ans = h * W + w * H - h * w 
print(ans)

Submission status: Wrong Answer

Solution code:
H,W = (int(j) for j in input().split())
h,w = (int(j) for j in input().split())
print(h*W + H*w - h*w)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H * W - (h * w))

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

sum = H * w
cnt = W * h + w * (H - h)
print(sum - cnt)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(h*W+w*H-h*w)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-H*w-W*h+min(w,h))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(h*W+w*H-min(h,w))

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
c, d = map(int, input().split())
print(a*b-c*d)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
print(a*b-c*d)

Submission status: Wrong Answer

Solution code:
H, W = map(int,input().split())
h, w = map(int,input().split())
print(H * w + h * W - h * w)

Submission status: Wrong Answer

Solution code:
HW=input()
hw=input()
HWlist=HW.split()
hwlist=hw.split()
print(HWlist)
print(hwlist)
H=int(HWlist[0])
W=int(HWlist[1])
h=int(hwlist[0])
w=int(hwlist[1])
print(H*W-h*W-H*w+h*w)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

print(H*W - h*w)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

print((H-h)*W-w)

Submission status: Wrong Answer

Solution code:
a, b = [int(i) for i in input().split()]
c, d = [int(i) for i in input().split()]

print(a*b - c*a - d*b + c + d)

Submission status: Wrong Answer

Solution code:
a, b = [int(i) for i in input().split()]
c, d = [int(i) for i in input().split()]

print(a*b - c*d)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b-c*d-d*c+c*d)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b-c-d+c*d)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b-c-d+1)

Submission status: Wrong Answer

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

def even_odd(x, n):
    if n == 1:
        if x % 4 == 1 or x % 4 == 2:
            return 1
        else:
            return 0

    num = (x % (2 ** n)) - 2 ** (n - 1)
    if num < 0:
        return 0
    elif num % 2 == 0:
        return 1
    else:
        return 0

s = 0
for i in range(1, 40):
    if (even_odd(B, i) + even_odd(A-1, i)) % 2 == 1:
        s += 2 ** (i - 1)
print(s)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(int((H*W)-(h*H+w*W - h*w)))

Submission status: Wrong Answer

Solution code:
#A - White Cells

import numpy as np

H, W = map(int, input().split())
h, w = map(int, input().split())

Orig = np.ones((H, W))
Orig[0:h, :] =0
Orig[:, 0:w ] =0

total = np.sum(Orig)
print(total)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
res=a*b-c*b-d*a+a*d
print(res)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
B=H*W-h*w
print(B)

Submission status: Wrong Answer

Solution code:
H,W = (int(i) for i in input().split())
h,w = (int(i) for i in input().split())

#calc
r = H-h
print((h*W)-(h*w))

Submission status: Wrong Answer

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

input_2 = input().split()

print((int(input_1[0]) - int(input_2[0])) * (int(input_1[1]) * int(input_2[1])))

Submission status: Wrong Answer

Solution code:
input_1 = input().split()
h_l = int(input_1[0])
w_l = int(input_1[1])

input_2 = input().split()
h = int(input_2[0])
w = int(input_2[1])

result = (h_l - h) * (w_l * w)

print(result)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print((H * W) - (H * h) - (W * w) + (h * w))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(int(H*W-h*W-w))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(int(H*W-h*w))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(int(H * W - h * w))

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
 
res = (H-h) * (h-w)
print(res)

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

res = (H-h) * (h-w)
print(res)

Submission status: Wrong Answer

Solution code:
H, W = map(int,input().split())
h, w = map(int,input().split())
print(H*W-h*w)