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:
H,W = input().split()
h,w = input().split()
A = int(H)
B = int(W)
a = int(h)
b = int(w)
C = (A-a)*(B-b)
print(C)

Submission status: Accepted

Solution code:
Height,Width = list(map(int,input().split()))
h,w = list(map(int,input().split()))

print((Height-h)*(Width-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=[int(z) for z in input().split(" ")]
h,w=[int(z) for z in input().split(" ")]
print(H*W-h*W-H*w+h*w)

Submission status: Accepted

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

print(a[0]*a[1] - b[0] * a[1] - b[1]*a[0] + b[0]*b[1])

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:
H, W = map(int, input().split())
h, w = map(int, input().split())

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

print(H * W - ans)

Submission status: Accepted

Solution code:
#n = int(input())
a,b=map(int,input().split()) #横並び
x,y=map(int,input().split())
ret = x*b+a*y-x*y
print(a*b-ret)
#x=[int(input()) for i in range(3)] #縦に並んだのを配列に
#y=list(map(int,input().split())) #横に並んだのを配列に
#print('YNEOS'[1::2])

Submission status: Accepted

Solution code:
from sys import exit

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

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

black = h * w

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

print(white)

Submission status: Accepted

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

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:
a,b = map(int,input().split())
c,d = map(int,input().split())
print((a - c) * (b-d))

Submission status: Accepted

Solution code:
temp = input().split(" ")
a = temp[0]
b = temp[1]
temp = input().split(" ")
c = temp[0]
d = temp[1]
x = int(a) - int(c)
y = int(b) - int(d)
print(x*y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
h, w = map(int, input().split())
ch, cw = map(int, input().split())
ans = h * w - (h * cw + w * ch - cw * ch)
print(ans)

Submission status: Accepted

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

print(H * W - h1 * W - w1 * H + h1 * w1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
lh, lw = list(map(int, input().split()))
h, w = list(map(int, input().split()))

ans = lh*lw - h*lw - w*lh +h*w
print(ans)

Submission status: Accepted

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

a = H-h
b = W-w

print(str(a*b))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
H = i[0]
W = i[1]
i1 = list(map(int, input().split()))
h = i1[0]
w = i1[1]

A = H - h
B = W - w

print(A * B)

Submission status: Accepted

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

x = (b - d) * (a - c)

if(x <= 0):
    print(0)
else:
    print(x)

Submission status: Accepted

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


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


# Generated by 1.1.3 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
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*W  - h * W - w * H  + 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:
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())

H, W = tuple(li())
h, w = tuple(li())

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

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

Submission status: Accepted

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

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:
HW = list(map(int,input().strip().split()))
hw = list(map(int,input().strip().split()))

print(HW[0] * HW[1] - hw[0] * HW[1] - hw[1] * HW[0] + hw[0] * hw[1])

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:


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(' '))
print(H*W-W*h-w*H+w*h)

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:
def solve(ch, cw, h, w):
    print((ch - h)*(cw - w))

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

solve(ch, cw, 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())
h, w =map(int,input().split())
total = H * W - (h * W) - (w * H) + (h * w)
print(total)

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

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

Submission status: Accepted

Solution code:
# ABC 121
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:
h1, w1 = (int(i) for i in input().split())
h2, w2 = (int(i) for i in input().split())
print((h1-h2)*(w1-w2))

Submission status: Accepted

Solution code:
h_max, w_max = map(int, input().split())
h, w = map(int, input().split())

print((h_max - h) * (w_max - w))

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
n,k=map(int,input().split())

print((h-n)*(w-k))

Submission status: Accepted

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

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

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:
h,w=list(map(int,input().split()))
hh,ww=list(map(int,input().split()))
print(h*w+hh*ww-w*hh-ww*h)

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*W - (h*W + H*w - h*w)
print(ans)

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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)

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 - w*H + 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-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:
# A
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h)*(W-w))

Submission status: Accepted

Solution code:
import sys

def main():
    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)



if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

print(Total - black)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


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



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

p = H*W
q = h*W+w*(H-h)

print(p-q)

Submission status: Accepted

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

def main():
	H, W = map(int, input().split())
	h, w = map(int, input().split())
	if H == h or W == w:
		print("0")
	else:
		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())

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

print(all_num)

Submission status: Accepted

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

ans = (h * w) - (a * w) - (b * h) + (a * b)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

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

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

input = lambda: stdin.readline()
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:
data = input().split()
H = int(data[0])
W = int(data[1])
data = input().split()
h = int(data[0])
w = int(data[1])

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

print(sou)

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:
a,b = map(int, input().split())
h,w = map(int, input().split())
white=a*b-h*b-a*w+h*w
print(white)

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:
H, W = [int(_) for _ in input().split()]
h, w = [int(_) for _ in input().split()]
print(H * W - (h * W + H * w - h * w))

Submission status: Accepted

Solution code:
[h1,w1] = [int(i) for i in input().split()]
[h2,w2] = [int(i) for i in input().split()]
print(h1*w1 - h2*w1 - w2*h1 + h2 * w2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
list1=input().split(' ')
a=int(list1[0])
b=int(list1[1])
list2=input().split(' ')
c=int(list2[0])
d=int(list2[1])
print((a-c)*(b-d))

Submission status: Accepted

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

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

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
import sys
def myin():
    for s in sys.stdin:
        for t in s.split():
            yield t
##
_in=myin()
H,W=int(next(_in)),int(next(_in))
h,w=int(next(_in)),int(next(_in))
print(H*W-(h*W+w*H-w*h))
##

Submission status: Accepted

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

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())
res = H*W - h*W - (H-h)*w
print(res)

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

print(ans)

Submission status: Accepted

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

print((h - a) * (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, M = map(int, input().split())
h,m = map(int, input().split())
print((H-h)*(M-m))

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(" "))
A,B = map(int,input().split(" "))
print((H-A)*(W-B))

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
H = a[0]
W = a[1]
b = list(map(int,input().split()))
h = b[0]
w = b[1]
print(str((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:
H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import numpy as np
import random

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


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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
hh, ww = map(int, input().split())

print((h-hh)*(w-ww))

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 = map(int,input().split())
h,w = map(int,input().split())

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

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 = H*W-h*W-w*H+h*w
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,M=map(int,input().split())
h,w=map(int,input().split())


print((H-h)*(M-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:
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 =  (int(i) for i in input().split())
h, w =  (int(i) for i in input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
#A=int(input())
#c=[]
#for i in range(n):
#    ci=int(input())
#    c.append(ci)
print((H-h)*(W-w))

Submission status: Accepted

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

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

Submission status: Accepted

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


def solve(H: int, W: int, h: int, w: int):
    print((H-h)*(W-w))
    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:
W, H = map(int, input().split())
w, h = map(int, input().split())
print((W-w)*(H-h))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
import sys
sys.setrecursionlimit(100000)
input=lambda : sys.stdin.readline().rstrip('\n')

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

Submission status: Accepted

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

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 python
# -*- coding: utf-8 -*-


def main():
  a, b = map(int, input().split())
  c, d = map(int, input().split())

  x = a * b
  x -= c * b
  x -= (a - c) * d

  print(x, flush=True)


if __name__ == '__main__':
  main()

Submission status: Accepted

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

a = A-a
b = B-b

print(a*b)

Submission status: Accepted

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

print(H*W - hh*W - ww*H + hh*ww)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict


def main():
    H, W = [int(q) for q in input().split()]
    h, w = [int(q) for q in input().split()]

    print(H * W - h * W - w * H + h * w)
    # table = [
    #     [int(q) for q in input().split()]
    #     for _ in range(a)
    # ]



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def inpl(): return list(map(int, input().split()))

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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:
p = input().split()
q = input().split()
print(int(p[0])*int(p[1])-int(q[0])*int(p[1])-int(q[1])*int(p[0])+int(q[1])*int(q[0]))

Submission status: Accepted

Solution code:
hh, ww = map(int, input().split(' '))
h, w = map(int, input().split(' '))

print((hh - h) * (ww - w))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    import sys
    input = sys.stdin.readline
    hh,ww = map(int, input().split())
    h, w = map(int, input().split())
    print(hh*ww-h*ww-hh*w+h*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:
h1,w1 = map(int,raw_input().split(" "))
h2,w2 = map(int,raw_input().split(" "))
print (h1-h2)*(w1-w2)

Submission status: Accepted

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

import sys, re
from collections import deque, defaultdict, Counter
from math import sqrt, hypot, factorial, pi, sin, cos, radians, log10
if sys.version_info.minor >= 5: from math import gcd
else: from fractions import gcd 
from heapq import heappop, heappush, heapify, heappushpop
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul, xor
from copy import copy, deepcopy
from functools import reduce, partial
from fractions import Fraction
from string import ascii_lowercase, ascii_uppercase, digits
from datetime import date

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def round(x): return int((x*2+1) // 2)
def fermat(x, y, MOD): return x * pow(y, MOD-2, MOD) % MOD
def lcm(x, y): return (x * y) // gcd(x, y)
def lcm_list(nums): return reduce(lcm, nums, 1)
def gcd_list(nums): return reduce(gcd, nums, nums[0])
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Mar  9 20:50:08 2019

@author: Yamazaki Kenichi
"""

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

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

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())
h2, w2 = map(int, input().split())
print((h-h2)*(w-w2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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 = map(int,input().split())
h,w = map(int,input().split())
print(H*W - (H*w + h*W - h*w))

Submission status: Accepted

Solution code:
# 2019/03/09
# AtCoder Beginner Contest 121 - A

# Input
h1, w1 = map(int,input().split())
h2, w2 = map(int,input().split())

# Calc
ans = (h1 - h2) * (w1 - w2)

# Output
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python2
"""
This file is part of https://github.com/cheran-senthil/PyRival
Copyright 2019 Cheran Senthilkumar <hello@cheran.io>

"""
from __future__ import division, print_function

import itertools
import os
import sys
from atexit import register
from io import BytesIO


class dict(dict):
    """ dict() -> new empty dictionary """

    def items(self):
        """ D.items() -> a set-like object providing a view on D's items """
        return dict.iteritems(self)

    def keys(self):
        """ D.keys() -> a set-like object providing a view on D's keys """
        return dict.iterkeys(self)

    def values(self):
        """ D.values() -> an object providing a view on D's values """
        return dict.itervalues(self)


def gcd(x, y):
    """ greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x


range = xrange

filter = itertools.ifilter
map = itertools.imap
zip = itertools.izip

sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))

input = lambda: sys.stdin.readline().rstrip('\r\n')


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

    print(H * W - (h * W + H * w - h * 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 - w*H + 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 = map(int,input().split())
h,w = map(int,input().split())
print(H*W-h*W-H*w +h*w)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc121/tasks/abc121_a
import itertools
import collections
import bisect

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:
n1, m1 = map(int, input().split())
n2, m2 = map(int, input().split())
print((n1-n2)*(m1-m2))

Submission status: Accepted

Solution code:
'''
Created on 2019年3月3日

@author: zcg01
'''
import math
import copy
 
 
 
 
def nCast(number):
    if type(number)==str:
        return int(number)
    for idx in range(0,len(number)):
        if type(number[idx])==str:
 
            number[idx]=int(number[idx])
        else:
            nCast(number[idx])
    return number
    
def inputArr(w):
    l=list()
    for idx in range(0,w):
        l.append(input())
    return l
def inputArr1(w):
    l=list()
    for idx in range(0,w):
        l.append(input())
    return l
 
a=nCast(input().split());
b=nCast(input().split());
 

 
def func():

    return (a[0]-b[0])*(a[1]-b[1])
print(func())

Submission status: Accepted

Solution code:
hh, ww = map(int, input().split())
h, w = map(int, input().split())

val = (hh-h) * (ww-w)
print(val)

Submission status: Accepted

Solution code:
def main() -> None:
    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:

def main():
    h,w = list(map(int,input().split()))
    h2,w2 = list(map(int,input().split()))
    print((h-h2)*(w-w2))

if __name__=='__main__':
    main()