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

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

print((H*W) - ((H*sw) + (W*sh) - (sw*sh)))

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

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

Submission status: Accepted

Solution code:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

h, w = na()
a, b = na()
c, d = a * w, b * (h - a)
print((h * w) - (c + 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:
H, W = map(int, input().split())
h, w = map(int, input().split())
result = (H - h) * (W - w)
print(result)

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

Submission status: Accepted

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


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:
h1,w1 = list(map(int,input().split()))
h2,w2 = list(map(int,input().split()))

ans = h1*w1 - h2*w1 - h1*w2 + h2*w2
print(ans)

Submission status: Accepted

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


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:
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:
def main(H,W,h,w):
    return (H-h)*(W-w)

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

print(main(H,W,h,w))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

Submission status: Accepted

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    H, W = MAP()
    h, w = MAP()
    print((H - h)*(W - w))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

white = H*W
black = h*W + w*H - h*w
ans = white - black
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 - h) * w)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
row, col = map(int, input().split())
hei, wid = map(int, input().split())
print((row-hei)*(col-wid))

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools

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

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:
a, b = (int(i) for i in input().split())
c, d = (int(i) for i in input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l = input().split(" ")
s = input().split(" ")

H = int(l[0])
W = int(l[1])
h = int(s[0])
w = int(s[1])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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:
"""
author : halo2halo
date : 15, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

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())
    print((H-h)*(W-w))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

H, W, h, w = map(int, sys.stdin.read().split())

def main():
    return H * W - (h * W + w * H - h * w)

if __name__ == '__main__':
    ans = main()
    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())

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

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

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:
rh,rw = map(int,input().split())
ch,cw = map(int,input().split())

print(rh*rw-(rw*ch+(rh-ch)*cw))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(output)

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:
import numpy as np
a, b = map(int, input().split())
c, d = map(int, input().split())
x = (np.array([a, b]) - np.array([c, d]))
print(x[0]*x[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input():
    return sys.stdin.readline().rstrip()

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

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    H,W=INTM()
    h,w=INTM()
    print(H*W-H*w-h*W+h*w)
if __name__ == '__main__':
    do()

Submission status: Accepted

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

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

Submission status: Accepted

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

import numpy as np

matrix = np.ones((H,W),dtype="uint8")
matrix[0:r,:] = 0
matrix[:,0:c] = 0
print(matrix.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*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:
h, w = map(int, input().split())
ch, wh = map(int, input().split())

ans = 0
for i in range(h-ch):
    for j in range(w-wh):
            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-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:
a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b - (b*c + (a-c)*d))

Submission status: Accepted

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


print(sum*sum1)

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

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


a, b = list(map(int, sys.stdin.buffer.readline().split()))
c, d = list(map(int, sys.stdin.buffer.readline().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)+(w*H)-(h*w)))

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    solve()

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

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

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 - ha) * (w - wa))

Submission status: Accepted

Solution code:
import os, sys, re, math

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

print(H * W - (h * W + H * w - 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:
a, b = list(map(int, input().split(' ')))
c, d = list(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-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:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

h,w = inpl()
a,b = inpl()
print(h*w-(a*w+h*b-a*b))

Submission status: Accepted

Solution code:
import numpy as np
print(np.prod(np.array(tuple(map(int, input().split()))) - np.array(tuple(map(int, input().split())))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
ans=a*b-b*c-a*d+c*d
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())
print(W*(H-h) - w*(H -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())

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

Submission status: Accepted

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

count = w * h
delete = x * h + y * w
delete -= x * y

print(count - delete)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

T = H*W
nu = h*W+H*w-w*h
print(T-nu)

Submission status: Accepted

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

a = H * W
b = h * W
c = w * (H - h)
d = a - (b + c)

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

print(h1*w1-(w1*h2+h1*w2-h2*w2))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def print_ans(H, W, h, w):
    """Test Case
    >>> print_ans(3, 2, 2, 1)
    1
    >>> print_ans(5, 5, 2, 3)
    6
    >>> print_ans(2, 4, 2, 4)
    0
    """
    print((H - h) * (W  -w))


if __name__ == '__main__':
    H, W = map(int, input().rstrip().split())
    h, w = map(int, input().rstrip().split())
    print_ans(H, W, h, w)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
h,w=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
import datetime

# 入力
#N = int(input())
#S = str(input())
H, W = map(int, input().split())
hi, wi = map(int, input().split())

print ((H*W) - ((hi*W) + (wi*H) - (hi*wi)))

Submission status: Accepted

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

HW = H * W
hW = h * W
Hw = H * w - h * w
print(HW - hW - Hw)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

H_h = H-h
W_w = W-w

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data = list(map(int,input().split()))
data2 = list(map(int, input().split()))

print(data[0]*data[1]-data2[0]*data[1]-(data[0]-data2[0])*data2[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:
# 2019-11-12 22:11:12(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    H, W, h, w = [int(x) for x in sys.stdin.read().split()]

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



if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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-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)
if ans >=0:
    print(ans)
else:
    print(0)

Submission status: Accepted

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

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

print(ret)

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

Submission status: Accepted

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

if(h>=H or w>=W):
    print(0)
else:
    print((H-h)*(W-w))

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print((a-line) * (b - row))

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:
# ABC 121: A – White Cells
h_origin, w_origin = [int(s) for s in input().split()]
h, w = [int(s) for s in input().split()]
print((h_origin - h) * (w_origin - w))

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

Submission status: Accepted

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

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