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

tile = np.zeros([H, W])
for r in range(h):
  tile[r, :] = 1
for c in range(w):
  tile[:, c] = 1

num_white = int(H * W - tile.sum())
print(num_white)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W=map(int, input().split())
h2,w2=map(int, input().split())
answer=0

sum_mass=H*W
answer=sum_mass - W*h2 - (H-h2)*w2
print(answer)

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, 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 + 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())
hi,wi=map(int,input().split())

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

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((a-c) * (b-d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = input()
table = line.split(" ")
nuru = input()
nurut = nuru.split(" ")
table_sum = int(table[0]) * int(table[1])
table_sum = table_sum - int(nurut[0])*int(table[1]) - int(nurut[1])*int(table[0]) + int(nurut[0])*int(nurut[1])
print(table_sum)

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

Submission status: Accepted

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

x, y = map(int, input().split())

n = H * W

n = n - (x * W + y * H) + x * y

print(n)

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

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

print(ans)

Submission status: Accepted

Solution code:
import re

H, W = [int(item) for item in re.split(r"\s", input())]
h, w = [int(item) for item in re.split(r"\s", input())]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ta,yo=map(int,input().split(" "))
gn,rn=map(int,input().split(" "))
print((ta-gn)*(yo-rn))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#ABC121A-WhiteCells.py

from sys import stdin

H, W = list(map(int, stdin.readline().split()))

h, w = list(map(int, stdin.readline().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

H_s,W_s = input().split()
h_s,w_s = input().split()

H = int(H_s)
W = int(W_s)
h = int(h_s)
w = int(w_s)

num_total    = H * W
num_black_h  = h * W
num_black_w  = H * w
num_black_hw = h * w
num_white = num_total - num_black_h - num_black_w + num_black_hw

print(num_white)

Submission status: Accepted

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

Submission status: Accepted

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

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:
s = map(int, raw_input().rstrip().split(' '))
z = map(int, raw_input().rstrip().split(' '))
print (s[0]-z[0]) * (s[1]-z[1])

Submission status: Accepted

Solution code:
s = map(int, raw_input().rstrip().split(' '))
z = map(int, raw_input().rstrip().split(' '))
print (s[0]-z[0]) * (s[1]-z[1])

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

s=H*W
l=h*W
t=H*w
d=h*w
print(s-l-t+d)

Submission status: Accepted

Solution code:
lh, lw = map(int, input().split())
h, w = map(int, input().split())

print((lh-h)*(lw-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())
 
total = H * W
num_del = h * W + H * w - h * w
print(total - num_del)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

all = H * W
l = w * H
r = h * W
d = h * w

ans = all - (l + r - d)

print(ans)

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

Submission status: Accepted

Solution code:
x = input().split(' ')
y = input().split(' ')
a = int(x[0])
b = int(x[1])
c = int(y[0])
d = int(y[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

row = H - h
col = W - w

print(row * col)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    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(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:
h, w = map(int, input().split())
h2, w2 = map(int, input().split())
print(h*w - h2*w - w2*h + h2*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:
#abc121a

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
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(w):
    for j in range(H):
        masu[j][i]=1
ans = 0
for i in range(W):
    for j in range(H):
        if masu[j][i]==0:
            ans += 1
print(ans)

Submission status: Accepted

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

print (A[0]*A[1])-(A[0]*B[1]+A[1]*B[0]-B[0]*B[1])

Submission status: Accepted

Solution code:
inp = input().split(' ')
H = int(inp[0])
W = int(inp[1])

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

totalNum = H * W

totalRow = h * W

totalCol = (H - h) * w

print(totalNum - totalRow - totalCol)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# AtCoder Beginner Contest 121
#

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

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

# 出力
print(whiteCells)

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

wite_square=H*W-(W*h_num)-(H*w_num)+(h_num*w_num)
print(wite_square)

Submission status: Accepted

Solution code:
#入力受け取り
H,W = [int(e) for e in input().split(' ')]
h,w = [int(e) for e in input().split(' ')]

#計算
ret = H*W - (h*W + H*w - h*w)

#表示
print(ret)

Submission status: Accepted

Solution code:
import sys

def main(inp):
    H,W=map(int,next(inp).split())
    h,w=map(int,next(inp).split())
    
    return H*W-(h*W+w*H-h*w)
  
print(main(sys.stdin))

Submission status: Accepted

Solution code:
from sys import stdin
n,m = map(int,stdin.readline().split())
x,y = map(int,stdin.readline().split())
tot = n*y + m*x - x*y
print n*m - tot

Submission status: Accepted

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

print(numCells)

Submission status: Accepted

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

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

M=np.zeros((H,W))

for n in range(h):
    print
    M[n]=1
for m in range(w):
        M.T[m]=1
        
print(len(M[M==0]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import sys

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

H = int(H)
W = int(W)
h = int(h)
w = int(w)

remain = H * W  #  最初の白いマス
remain -= h * W
remain -= w * (H - h)

print(remain)

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

Submission status: Accepted

Solution code:
# /user/bin/python
# -*- coding: utf-8 -*-
import sys 


h,w = map(int, sys.stdin.readline().rstrip().split())
h2,w2 = map(int, sys.stdin.readline().rstrip().split())

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

Submission status: Accepted

Solution code:
[print((H-h)*(W-w))for H,W,h,w in[map(int,open(0).read().split())]]

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:
[print(f.reduce(o.mul,f.reduce(lambda x,y:[x[0]-y[0],x[1]-y[1]],[[int(i)for i in input().split()],[int(i)for i in input().split()]])))for f,o in[[__import__('functools'),__import__('operator')]]]

Submission status: Accepted

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

Submission status: Accepted

Solution code:
the_string = raw_input()
COLS, ROWS = the_string.split()
two_string = raw_input()
co, ro = two_string.split()


Mylist= [[0 for cols in range(int(COLS))] for rows in range(int(ROWS))]

for cols in range(int(co)):
        for rows in range(int(ROWS)):
                Mylist[rows][cols]=1

for rows in range(int(ro)):
        for cols in range(int(COLS)):
                Mylist[rows][cols]=1

d = sum(row.count(0) for row in Mylist)

print(d)

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
first_args = raw_input().split()
second_args = raw_input().split()

max_row = int(first_args[0])
max_col = int(first_args[1])

fill_row = int(second_args[0])
fill_col = int(second_args[1])

if(fill_row <= max_row and fill_col <= max_col):
  all_cells = max_row * max_col
  filled_cells = (fill_row * max_col) + (fill_col * max_row) - (fill_row * fill_col)

  print all_cells - filled_cells

Submission status: Accepted

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

l = [[0 for i in range(X)] for j in range(H)]

for i in range(h):
    for j in range(X):
        l[i][j]=1

for i in range(H):
    for j in range(w):
        l[i][j]=1
        
print(sum(x.count(0) for x in l))

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def int_raw():
    return int(raw_input())

def ss_raw():
    return raw_input().split()

def ints_raw():
    return map(int,ss_raw())

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

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

Submission status: Accepted

Solution code:
import sys

def main():
    (H, W), (h, w) = map(lambda s: map(int, s.strip().split()), sys.stdin.readlines())
    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 - 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:
# atcoder
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 = list(map(int, input().split()))
h, w = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input().split()
n=int(s[0]);m=int(s[1])
s=input().split()
n-=int(s[0]);m-=int(s[1])
print(n*m)

Submission status: Accepted

Solution code:
# coding: utf-8
h, w = map(int, input().split())
c_h, c_w = map(int, input().split())
print(h * w - (h * c_w + w * c_h) + c_h * c_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(x) for x in input().split(' ')]
h,w =  [int(x) for x in input().split(' ')]
s = H * W
s -= h * W
s -= w * H
s += h * w
print(s)

Submission status: Accepted

Solution code:
usr1 = input()
usr2 = input()

lst1 = usr1.split()
lst2 = usr2.split()
numlst1=[]
numlst2=[]

for element in lst1:
    numlst1.append(int(element))

for element in lst2:
    numlst2.append(int(element))

print((numlst1[0] - numlst2[0])*(numlst1[1]-numlst2[1]))

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:
import sys
original = sys.stdin.readline().strip().split(" ")
new = sys.stdin.readline().strip().split(" ")

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

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

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

print(result)

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    h,w = LI()
    a,b = LI()

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


print(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 - w * 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:
# -*- 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())

List = []
for i in range(H):
    l = []
    for j in range(W):
        l.append(0)
    List.append(l)

for i in range(h):
    for j in range(W):
        List[i][j] = 1
for i in range(H):
    for j in range(w):
        List[i][j] = 1

count = 0
for i in range(H):
    count += List[i].count(0)

print(count)

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

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

for h_i in range(h):
    mas[h_i] = [1] * W

for w_i in range(w):
    for i in range(H):
        mas[i][w_i] = 1

count = 0
for h_i in range(H):
    for w_i in range(W):
        if mas[h_i][w_i] == 0:
            count += 1
print(count)

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:
l1 = list(map(int,input().split(" ")))
l2 = list(map(int,input().split(" ")))

print((l1[0] - l2[0]) * (l1[1] - l2[1]))

Submission status: Accepted

Solution code:
lh, lw = map(int, input().split())
h, w = map(int, input().split())

print(lh * lw - lh * w - lw * 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())

A = H * W
B = W * h + (H - h) * w

R = A - B

print(R)

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:
s = [input().split() for i in range(2)]

a, b, c, d = int(s[0][0]), int(s[0][1]), int(s[1][0]), int(s[1][1])

sum_cells_count = a * b
row_cells_count = b * c
col_cells_count = (a - c) * d

filled_cells_count = row_cells_count + col_cells_count

blank_cells_count = sum_cells_count - filled_cells_count
print(blank_cells_count)

Submission status: Accepted

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

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

print("{}".format(mergin))

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


x=h*w#被ったかず
X=w*H#残った個数
Y=h*W
Z=X+Y
print(H*W+x-Z)

Submission status: Accepted

Solution code:
# _*_ coding:utf-8 _*_
#  Atcoder_Beginners_Contest121-A
#  TODO https://atcoder.jp/contests/abc121/tasks/abc121_a

def whiteCells(AllHeight,selectHeight,AllWidth,selectWidth):
	answer = (AllHeight-selectHeight)*(AllWidth-selectWidth)
	return answer


if __name__ == '__main__':
	H,W = map(int,input().strip().split(' '))
	hl,wl = map(int,input().strip().split(' '))
	solution = whiteCells(H,hl,W,wl)
	print("{}".format(solution))

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [H, W] = [int(input_raw[0]), int(input_raw[1])]
    input_raw = read_func().strip().split()
    [h, w] = [int(input_raw[0]), int(input_raw[1])]
    print (H - h) * (W - 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*W-h*W-H*w+h*w)

Submission status: Accepted

Solution code:
import sys

if __name__ == "__main__":
    para_list1 = list(map(int, input().split()))
    H = para_list1[0]
    W = para_list1[1]

    para_list2 = list(map(int, input().split()))
    h = para_list2[0]
    w = para_list2[1]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Mar  9 21:53:23 2019

@author: yuta
"""

HW = list(map(int,input().split()))
hw = list(map(int,input().split()))
H = HW[0]
W = HW[1]
h = hw[0]
w = hw[1]

def main(A,B,a,b):
    print((A-a)*(B-b))
main(H,W,h,w)

Submission status: Accepted

Solution code:
a,b=(int(x) for x in input().split())
c,d=(int(y) for y in input().split())
print((a - c) * (b - d))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
I=lambda:map(int,input().split())
H,W=I()
h,w=I()
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 = [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:
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:
a,b = list(map(int,input().split()))
x,y=list(map(int,input().split()))
ret=(a-x)*(b-y)
print(ret)

Submission status: Accepted

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

def io_generator():
	return input()

#+++++++++++++++++++

def main(io):
	w,h= map(int, io().split())
	w1,h1= map(int, io().split())
	return (w-w1)*(h-h1)

#++++++++++++++++++++

if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
	H, W = map(int, input().split(" "))
	h, w = map(int, input().split(" "))
	
	total = H - h
	total2 = W - w
	
	print(total * total2)
			
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
def white_cells(H: int, W: int, h: int, w: int)->int:
    return (H-h) * (W-w)


if __name__ == "__main__":
    H, W = map(int, input().split())
    h, w = map(int, input().split())
    ans = white_cells(H, W, h, w)
    print(ans)

Submission status: Accepted

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


import sys
import math

# 1整数
# n = int(input())

# 空白区切り2整数
H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))

# 空白区切りリスト
print((H - h) *( W - w))

Submission status: Accepted

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

s = a*b
nuri = c*b+a*d-c*d
print(s-nuri)

Submission status: Accepted

Solution code:
original_height, original_width = map(int, input().split(' '))
blacken_height, blacken_width = map(int, input().split(' '))

print((original_height - blacken_height) * (original_width - blacken_width))

Submission status: Accepted

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

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

print (result)

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = A[0] - B[0]
D = A[1] - B[1]
print(C*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:
a,b=[int(x)-int(y)for x,y in zip(*[input().split()for _ in[0,0]])]
print(a*b)

Submission status: Accepted

Solution code:
# S = input()
# print('Heisei' if S <= '2019/04/30' else 'TBD')

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

W, H = [int(i) for i in raw_input().split()]
w, h = [int(i) for i in raw_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(H*W - h*W - (H-h)*w)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
h,w = map(int, input().split())
hh,ww = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

rest = H * W
ans = rest - (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 + 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)))