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

delrow = h*W
delcol = w*H
dup = h*w
print(H*W - delrow - delcol + dup)

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    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:
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(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())
ans = H*W - (h*W + w*H - 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))
main()

Submission status: Accepted

Solution code:
import math
import collections
import sys

#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

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

Submission status: Accepted

Solution code:
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# 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 = 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())
A=H*W
B=h*W
C=w*(H-h)
print(A-B-C)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

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

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

N,M = map(int,input().split())
n,m = map(int,input().split())

print((N-n) * (M-m))

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

Submission status: Accepted

Solution code:
# from math import factorial,sqrt,ceil
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix

# strlist = "abcdefghijklmnopqrstuvwxyz"
H,W = map(int,input().split())
h,w = map(int,input().split())

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

print(ans)
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(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-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(str((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 = list(map(int,input().split()))
h,w=list(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-h)*(W-w)
print(ans)

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    H, W = input_nums()
    h, w = input_nums()
    total = H*W
    print(total - (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:
H, W, h, w = map(int, open(0).read().split())
print((H-h)*(W-w))

Submission status: Accepted

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

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

Submission status: Accepted

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

print((x-a)*(y-b))

Submission status: Accepted

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

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

H,W = LI()
h,w = LI()
print(H*W - h*W - H*w + h*w)

Submission status: Accepted

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

ans = hh*ww - h*ww - w*hh + h*w

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

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

print(cnt)

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:
# ABC 121: A – White Cells
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:
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:
p,q= input().split()
a,b =(int(p), int(q))
P,Q= input().split()
A,B =(int(P), int(Q))
print(int((a-A)*(b-B)))

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import itertools
import fractions
def main():
  H,W = map(int,input().split())
  h,w = map(int,input().split())
  print((H-h)*(W-w))
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
sh, sw = map(int, input().split())

dup = sh*sw
black = sh*w + sw*h - dup
white = h*w - black

print(white)

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

Submission status: Accepted

Solution code:
import sys

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

def main():
    res = H * W - (h*W + H*w - h*w)
    print(res)

if __name__ ==  '__main__':
    main()

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:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a, b = map(int, input().split())
    c, d = map(int, input().split())

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
H,W = iim()
h,w = iim()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  #n = int(input())
  #s = input()
  #s = input().split()
  a,b = list(map(int,input().split()))
  c,d = list(map(int,input().split()))
  #a = [input() for i in range(n)]
  #a = [int(input()) for i in range(n)]
  #a = [input().split() for i in range(n)]
  #a = [list(map(int,input().split())) for i in range(n)]
  ans = 0
  count = 0
  lis = []
  
  print(a*b-(c*b+d*a-c*d))

if __name__ == '__main__':
  main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

main()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

area = H*W

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

Submission status: Accepted

Solution code:
import sys
import math
import string
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
from bisect import bisect, bisect_left, bisect_right

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

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

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
diff = white - black
print(diff)

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:
# coding: utf-8
import os
from sys import stdin

# __dirname = os.path.dirname(__file__)
# __basename = os.path.splitext(os.path.basename(__file__))[0]
# __targetname = './input/' + __basename + '.txt'
# target_path = os.path.join(__dirname, __targetname)
# stdin = open(target_path)

def main():
    input_line = stdin.readline().rstrip().split(' ')
    H,W = map(int, input_line)
    # data = [stdin.readline().rstrip().split(' ') for _ in range(N)]
    input_line = stdin.readline().rstrip().split(' ')
    h,w = map(int, input_line)
    print((H-h)*(W-w))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
s,t = map(int,input().split())

print((h-s)*(w-t))

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

Submission status: Accepted

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

    sum1 = a-c
    sum2 = b-d

    ans = sum1*sum2

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

total = A * B #全マスの数
black = (a * B + b * A) - (a * b) #塗りつぶされるマスの数

ans = total - black

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

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())
left = H*W
for i in range(h):
    left -= W
for i in range(w):
    if left <= 0:
        left = 0
    else:
        left -= H-h
print(left)

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os


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

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

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


print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
#!/usr/bin/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:
A,B=map(int,input().split())
h,w=map(int,input().split())
print(A*B-A*w-B*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


# Generated by 1.1.6 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 = list(map(int, input().split()))
h, w = list(map(int, input().split()))
t, hw, ans = 0, 0, 0
hw = h * w
t = H * W
print(t + hw - h * W - w * H)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
stdin = input().split(" ")
stdin2 = input().split(" ")

Hh = int(stdin2[0]) - int(stdin[0])
Ww = int(stdin2[1]) - int(stdin[1])
print(Hh * Ww)

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

Submission status: Accepted

Solution code:
import numpy as np


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

Submission status: Accepted

Solution code:
[H,W] = list(map(int,input().split()))
[X,Y] = list(map(int,input().split()))
print((H-X)*(W-Y))

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

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

s = H*W

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

print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H, W = [int(_) for _ in input().split()]
h, w = [int(_) for _ in input().split()]
print(H * W + 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:
H,W = map(int,input().split())
h,w = map(int,input().split())
dp = [["W" for i in range(H)] for i in range(W)]
sums = H*W
ans = sums - (h*W+w*H-(h*w))
print(ans)

Submission status: Accepted

Solution code:
# ALC008 B

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:
# coding: utf-8
# Your code here!
H,W=map(int,input().split())
h,w=map(int,input().split())
print((H-h)*(W-w))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc121/tasks/abc121_a

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:
H, W = map(int, 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())

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

    print(total)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(H*W-paint)

Submission status: Accepted

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

Submission status: Accepted

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