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

Solution code:
a=list(input().split())
b=list(input().split())
c=int(a[0])
d=int(a[1])
e=int(b[0])
f=int(b[1])
g=c*d-d*e-c*f+e*f
print(g)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

grid = [[0]*W for i in range(H)]

for i in range(h):
    grid.pop(0)
for j in range(w):
    for i in range(len(grid)):
        grid[i].pop(0)

for k in grid:
    ans += len(k)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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



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

Submission status: Accepted

Solution code:
def main():
	wh, ww = map(int, input().split())
	bh, bw = map(int, input().split())
	print((wh-bh)*(ww-bw))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np
H, W = map(int, raw_input().split())
h, w = map(int, raw_input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def is_int(s):
    try:
        i = int(s)
    except:
        return False
    return True

str = input().split()

if (len(str) > 2):
    print("Too many arguments.")
    exit()
elif (len(str) < 2):
    print("Too few arguments.")
    exit()
elif (not is_int(str[0])):
    print("H is not a number.")
    exit()
elif (not is_int(str[1])):
    print("W is not a number.")
    exit()

H = int(str[0])
W = int(str[1])

str = input().split()

if (len(str) > 2):
    print("Too many arguments.")
    exit()
elif (len(str) < 2):
    print("Too few arguments.")
    exit()
elif (not is_int(str[0])):
    print("h is not a number.")
    exit()
elif (not is_int(str[1])):
    print("w is not a number.")
    exit()

h = int(str[0])
w = int(str[1])

if (H < 1 or H > 20):
    print("Out of range at H.")
    exit()
elif (W < 1 or W > 20):
    print("Out of range at W.")
    exit()
elif (h < 1 or h > 20 or h > H):
    print("Out of range at h.")
    exit()
elif (w < 1 or w > 20 or w > W):
    print("Out of range at w.")
    exit()

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

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

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


main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - White Cells
https://atcoder.jp/contests/abc121/tasks/abc121_a

"""
import sys


def main(args):
    H, W = map(int, input().split())
    h, w = map(int, input().split())
    ans = (H * W) - (H * w) - (W * h) + (w * h)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

a,b = map(int,input().split())
h,w = map(int,input().split())
res = a*b-h*b-(a-h)*w
print(res)

Submission status: Accepted

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

masu = [[0] * W for i in range(H)]

for i in range(h):
    for j in range(W):
        masu[i][j] = 1

for i in range(H):
    for j in range(w):
        masu[i][j] = 1

for i in range(H):
    for j in range(W):
        if masu[i][j] == 0:
            ans += 1

print(ans)

Submission status: Accepted

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

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

U = H * W
black = h * W + w * H - h * w
print(U - black)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))
n = list(map(int, input().split()))

print((N[0]-n[0])*(N[1]-n[1]))

Submission status: Accepted

Solution code:
def solve(string):
    h, w, _h, _w = map(int, string.split())
    return str((h - _h) * (w - _w))


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

total = H * W
black = W*h + H*w - h*w
ans = total - black
print (ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
def solve(H, W, h, w):
    return (H-h)*(W-w)

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

Submission status: Accepted

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

print(x)

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
x,y=map(int,input().split())
print(n*m-x*m-y*(n-x))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
C,D = map(int,input().split())
print(abs(A-C)*abs(B-D))

Submission status: Accepted

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

Submission status: Accepted

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

white = H * W
bh = h * W
bw = w * H
bd = h * w

rest = white - bh - bw + bd

print(rest)

Submission status: Accepted

Solution code:
import sys

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

math_count = H * W
delete_math_count = (h * W) + (w * (H - h))

print(math_count - delete_math_count)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

masu = H * W
kuro = h*W + H*w - h*w

print(masu - kuro)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
x, y = map(int, input().split())

print(H*W-x*W-(H-x)*y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
g, r = map(int, input().split())
g_, r_ = map(int, input().split())
print((g * r) - (g * r_ ) - (g_ * r) + (g_ * r_))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, W = [int(i) for i in input().split()]
bh, bw = [int(i) for i in input().split()]

res = (H * W) - ((bh*W) + (bw*H) - (bh*bw))

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hw = input().split()
h = int(hw[0])
w = int(hw[1])
hw_dis = input().split()
h_dis = int(hw_dis[0])
w_dis = int(hw_dis[1])
print(h*w-h_dis*w-w_dis*h+h_dis*w_dis)

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
        main()

Submission status: Accepted

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

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

Submission status: Accepted

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



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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import io, sys, atexit, os

import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations


def li ():
	return list (map (int, input ().split ()))


def num ():
	return map (int, input ().split ())


def nu ():
	return int (input ())


def find_gcd ( x, y ):
	while (y):
		x, y = y, x % y
	return x


mm = 1000000007



def solve ():
	t = 1
	for it in range (t):
		a,b=num()
		c,d=num()
		ff=c*b+a*d-(c*d)
		print(a*b-ff)





if __name__ == "__main__":
	solve ()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

mass = H*W
delmass = h * W + w * (H-h)

print(mass-delmass)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

from pprint import pprint
from random import shuffle, sample

import numpy as np
import random

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

array = np.zeros((H, W), dtype=np.bool)

for r in sample(list(range(H)), h):
    array[r, :] = True

for c in sample(list(range(W)), w):
    array[:, c] = True

print(len(array[array == False]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

H = int(H)
W = int(W)

h = int(h)
w = int(w)

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

print(S)

Submission status: Accepted

Solution code:
matrix = list(map(int,input().split()))
shitei = list(map(int,input().split()))

masume = matrix[0]*matrix[1]
black = shitei[0]*matrix[1]+shitei[1]*(matrix[0]-shitei[0])
white = masume-black

print(white)

Submission status: Accepted

Solution code:
from math import *



h,k=map(int,input().split(" "))
a,b=map(int,input().split(" "))

print((h*k)-(a*k)-(b*h)+(a*b))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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

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

Submission status: Accepted

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

x=int(H)-int(h)
y=int(W)-int(w)
print(x*y)

Submission status: Accepted

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

a=int(H)-int(h)
b=int(W)-int(w)
print(a*b)

Submission status: Accepted

Solution code:
input1 = input().split()
input2 = input().split()

W = int(input1[0])
w = int(input2[0])
H = int(input1[1])
h = int(input2[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
line, row = map(int,input().split())
line_marker, row_marker = map(int, input().split())
line -= line_marker
row -= row_marker
print(line * row)

Submission status: Accepted

Solution code:
h_all, w_all = map(int, input().split())
h_b, w_b = map(int, input().split())
 
print((h_all - h_b) * (w_all - w_b))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

#print(H)
#print(W)
#print(h)
#print(w)

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

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

# h個の行とw個の列を選択
h, w = [int(x) for x in stdin.readline().rstrip().split()]

white_cell = H * W

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

print(white_cell - black_cell)

Submission status: Accepted

Solution code:
matrix = input().split(" ")
select = input().split(" ")
ans = 0
x = int(matrix[0]) - int(select[0])
y = int(matrix[1]) - int(select[1])
ans = x * y
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
white_cell = H * W
# draw by raw
white_cell -= h * W
#draw by colum
white_cell -= (H - h) * w

print(white_cell)

Submission status: Accepted

Solution code:
K,W = [int(x) for x in input().split()]
h,w = [int(x) for x in input().split()]
print ((K-h)*(W-w))

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

Solution code:
#!/usr/bin/env pyton3

num1 = input().split()
num2 = input().split()

H = int(num1[0])
W = int(num1[1])
h = int(num2[0])
w = int(num2[1])

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

print(total)

Submission status: Accepted

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

N_black = h * W + H * w - h * w
N_white = H * W - N_black

print(N_white)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
H,W = list(map(int,input().split()))
h,w = list(map(int,input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(H: int, W: int, h: int, w: int):
    ret = (H - h) * (W - w)
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    h = int(next(tokens))  # type: int
    w = int(next(tokens))  # type: int
    solve(H, W, h, w)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print((a-h)*(b-w))

Submission status: Accepted

Solution code:
input_line = input()
temp = input_line.split()
H, W = int(temp[0]), int(temp[1])
input_line = input()
temp = input_line.split()
h, w = int(temp[0]), int(temp[1])

field = H*W
colored = h*W + w*H - w*h

print(field - colored)

Submission status: Accepted

Solution code:
import sys

H, W = map(int, sys.stdin.readline().split())
h, w = map(int, sys.stdin.readline().split())
print((H - h) * (W - w))

Submission status: Accepted

Solution code:
N,M=map(int,input().split())
A,B=map(int,input().split())
X=(N-A)*(M-B)
print(X)

Submission status: Accepted

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

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

print(white-black)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = [input().split() for i in range(2)]
H = int(n[0][0])
W = int(n[0][1])
h = int(n[1][0])
w = int(n[1][1])
answer = H*W-h*W-w*H+h*w
print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- Coding: utf-8 -*-

import numpy as np

INPUT=input().split()
Input=input().split()
H,W=int(INPUT[0]),int(INPUT[1])
h,w=int(Input[0]),int(Input[1])

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

print(int(np.sum(mat)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


print((m - a) * (n - b))

Submission status: Accepted

Solution code:
bigH, bigW = map(int, input().split())
smallH, smallW = map(int, input().split())

print((bigH-smallH)*(bigW-smallW))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

H, W = na()
h, w = na()

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

Submission status: Accepted

Solution code:
def white_cells(H, M, h, m):
    return H*M - h*M - m*H + h*m


if __name__ == "__main__":
    HM = list(map(int, input().split()))
    H = HM[0]
    M = HM[1]
    hm = list(map(int, input().split()))
    h = hm[0]
    m = hm[1]

    ret = white_cells(H, M, h, m)
    print(ret)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

ipt = list(map(int,input().split()))
cr = list(map(int,input().split()))
print((ipt[0]-cr[0])*(ipt[1]-cr[1]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#coding: utf-8

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import re

n = input()
n = re.split(" ",n)

m = input()
m = re.split(" ",m)

a = int(n[0])* int(n[1])
b = (int(m[0]) * int(n[1])) + (int(m[1]) * int(n[0]))
b = a-b
c = int(m[0]) * int(m[1])
print(b+c)

Submission status: Accepted

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

main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
H, W = map(int, input().split())
all = H * W

h, w = map(int, input().split())
blank = all - h*W - w*H + h*w

print(blank)

Submission status: Accepted

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

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

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

print(rest_white_lattice)

Submission status: Accepted

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 + w * H - w * h))

Submission status: Accepted

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

Submission status: Accepted

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

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
lh, lw, h, w = map(int, open(0).read().split())
print((lh - h) * (lw - w))

Submission status: Accepted

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

whitecells = H*W
blackcells = (h*W + H*w) - h*w

print("{}".format(whitecells - blackcells))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# スペース区切りの整数の入力
h1, w1 = map(int, input().split())
h2, w2 = map(int, input().split())
  
# 文字列の入力
#s = input()
# 出力
print("{}".format((h1-h2)*(w1-w2)))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
H,W=map(int,input().split())
h,w=map(int,input().split())
print((H-h)*(W-w))

Submission status: Accepted

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

Solution code:
import numpy as np


H, W = map(int, input().split())
h, w = map(int, input().split())
board = np.ones((H, W), dtype=int)
board[0:h] = 0
board[:, 0:w] = 0
print(board.sum())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
R, W = map(int, raw_input().split())
r, w = map(int, raw_input().split())
print R * W - R * w - r * W + r * w

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    large_h, large_w = map(int, input().split())
    h, w = map(int, input().split())
    print((large_h - h) * (large_w - w))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = input()
y = input()
H = int(x.split()[0])
W = int(x.split()[1])
h = int(y.split()[0])
w = int(y.split()[1])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

if __name__ == "__main__" :
	main()

Submission status: Accepted

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

blacks = (h * W) + (w * H) - (h * w)
whites = H * W - blacks

print(whites)

Submission status: Accepted

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

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

Submission status: Accepted

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

# In[4]:


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


# In[5]:


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


# In[ ]:

Submission status: Accepted

Solution code:
LH, LW = map(int,input().split())
sh, sw = map(int,input().split())
print((LH-sh)*(LW-sw))

Submission status: Accepted

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

Solution code:
from itertools import combinations, product


def gcd(a, b):
    if a < b:
        a, b = b, a
    while b != 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gcd(a, b)


def get(fmt):
    ps = input().split()
    r = []
    for p, t in zip(ps, fmt):
        if t == "i":
            r.append(int(p))
        if t == "f":
            r.append(float(p))
        if t == "s":
            r.append(p)
    if len(r) == 1:
        r = r[0]
    return r

def put(*args, **kwargs):
    print(*args, **kwargs)


def rep(n, f, *args, **kwargs):
    return [f(*args, **kwargs) for _ in range(n)]
    
def rep_im(n, v):
    return rep(n, lambda: v)
    
YES_NO = ["NO", "YES"]

H, W = get("ii")
h, w = get("ii")

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Solution code:
hw = list(map(int, input().split()))
h = hw[0]
w = hw[1]

hw2 = list(map(int, input().split()))
h2 = hw2[0]
w2 = hw2[1]

print((h - h2) * (w - w2))

Submission status: Accepted

Solution code:
h1, w1 = list(map(int, input().split()))
h2, w2 = list(map(int, input().split()))
print((h1 - h2) * (w1 - w2))