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:

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 bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    H, W = LI()
    h, w = LI()

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

if __name__ == '__main__':
    resolve()

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

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

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

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


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

res = max(0, H - h) * max(0, W - w)
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [list(map(int, input().split())) for i in range(2)]
H = a[0][0] 
W = a[0][1] 
h = a[1][0] 
w = a[1][1] 
my_result = H * W - h * W - H * w + h * w
print(my_result)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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
print(S-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:
ary = input().split(" ")
H = int(ary[0])
W = int(ary[1])
aryary = input().split(" ")
h = int(aryary[0])
w = int(aryary[1])

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+1*(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())

ans = H*W - h*W - w*H + h*w
if ans < 0:
  print(0)
else:
  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-h)*(W-w))

Submission status: Accepted

Solution code:
# abc121_a.py
# https://atcoder.jp/contests/abc121/tasks/abc121_a

# A - White Cells /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# H行 W列の白色のマス目があります。
# あなたは h個の行と w個の列を選び、選んだ行または列に含まれるマス目を全て黒色で塗りつぶします。
# 白色のマス目はいくつ残るでしょうか。
# なお、残る白色のマス目の数は行や列の選び方によらないことが証明できます。

# 制約
#     入力は全て整数である。
#     1≤H,W≤20
#     1≤h≤H
#     1≤w≤W

# 入力
# 入力は以下の形式で標準入力から与えられる。
# H W
# h w

# 出力
# 残る白色のマス目の数を出力せよ。

# 入力例 1
# 3 2
# 2 1

# 出力例 1
# 1

# 3行 2 列の白色のマス目があり、2 行と 1 列を選んで黒色で塗りつぶしたとき、白色のマス目は必ず 1個だけ残ります。

# 入力例 2
# 5 5
# 2 3

# 出力例 2
# 6

# 入力例 3
# 2 4
# 2 4

# 出力例 3
# 0


def calculation(lines):
    # line = lines[0]
    # N = int(lines[0])
    H, W = list(map(int, lines[0].split()))
    h, w = list(map(int, lines[1].split()))
    # values = list(map(int, lines[1].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i+1]))

    return [(H-h)*(W-w)]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['3 2', '2 1']
        lines_export = [1]
    if pattern == 2:
        lines_input = ['5 5', '2 3']
        lines_export = [6]
    if pattern == 3:
        lines_input = ['2 4', '2 4']
        lines_export = [0]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

start_state = H * W
deduct_state = h * W + w * H - h * w

answer = start_state - deduct_state

print(answer)

Submission status: Accepted

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

print((H-Record)*(W-Column))

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

all = H * W

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

Submission status: Accepted

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

Submission status: Accepted

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

S = H * W

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

print(left)

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
HW =[list(map(int,input().split())) for i in range(2)]
print((HW[0][0]-HW[1][0])*(HW[0][1]-HW[1][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:
H, W = map(int, input().split())
a, b = map(int, input().split())
print(H*W-H*b-W*a+a*b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc121
# 8:50-


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

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


print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    h, w = map(int, readline().split())
    p, q = map(int, readline().split())

    print(h * w - p * w - q * (h - p))


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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
ans=H*W-H*w-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))
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:
import sys
H,W = map(int,input().split())
h,w = map(int,input().split())
array = [[0]*W for I in range(H)]
# fill Horizone 1
for I in range(h):
    array[I] = [1]*W
# replace Horizone and Vertical
array = [list(x) for x in zip(*array)]
# fill Horizone 1
for I in range(w):
    array[I] = [1]*H
# replace Horizone and Vertical
array = [list(x) for x in zip(*array)]

count = 0
for I in range(H):
    count += array[I].count(0)
print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
import copy
 
## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
#    S = []
#    for _ in range(N):
#        S.append(list(input()))
 
H,W=map(int, input().split())
S,T=map(int, input().split())

print(H*W - W*S - (H-S)*T)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
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:
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:
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:
h,w = map(int,input().split())
erase_h,erase_w = map(int,input().split())

white_b = h*w

erase = erase_h*w + erase_w*h - (erase_h*erase_w)

print(white_b - erase)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
rm = lambda: map(int, sys.stdin.buffer.readline().split())

a, b = rm()
c, d = rm()
print((c-a) * (d-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 = 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())
h1,w1=map(int,input().split())
print((h*w)-(w*h1)-((h-h1)*w1))

Submission status: Accepted

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

Submission status: Accepted

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

allmenseki = H*W

kuro_yoko = h*W

kuro_tate = (H-h)*w

siro = allmenseki - (kuro_yoko + kuro_tate)

print(siro)

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

print((A-C) * (B-D))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
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 - ((W * h) + (H * w) - (h * w)) )

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
H,W = (int(i) for i in input().split())
h,w = (int(i) for i in input().split())
common =h*w
ans = H*W -h*W -H*w +common
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+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())
h,w = map(int,input().split())

print(max(H*W-h*W-(H-h)*w,0))

Submission status: Accepted

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

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

H -= h
W -= w

print(H*W)

Submission status: Accepted

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

Submission status: Accepted

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

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

main()

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

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

print(Area)

Submission status: Accepted

Solution code:
HW = [int(i) for i in input().split()]
hw = [int(i) for i in input().split()]

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

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, raw_input().split(' '))
h,w = map(int, raw_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:
def main():
    H,W = map(int,input().split())
    h,w = map(int,input().split())
    print((H-h)*(W-w))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,M = map(int,input().split())
h,m = map(int,input().split())

print((M - m) * (H - h))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

input_n = lambda: int(readline())
input_nn = lambda: map(int, readline().split())
input_s = lambda: readline().rstrip().decode('utf-8')
input_ss = lambda: readline().rstrip().decode('utf-8').split()


def main():
    H, W = input_nn()
    h, w = input_nn()
    ans = H * W - (H * w + W * h - h * w)
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
h, w, x, y = map(int, open(0).read().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 - 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())
H,W=map(int,input().split())
print((h-H)*(w-W))

Submission status: Accepted

Solution code:
#!/usr/bin/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 = [int(x) for x in input().split()]
h,w = [int(x) for x in input().split()]
 
ans = (H-h)*(W-w)
 
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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:
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 math
def ip():return int(input())
def inp():return map(int,input().split())

H,W=inp()
h,w=inp()
print((H-h)*(W-w))

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

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

print(s)

Submission status: Accepted

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

hyo = H * W
hr = h * W
wr = w * (H-h)

ans = (hyo - (hr+wr))
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-h)*(W-w))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
#import sys
#import numpy as np
#import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
h,w=map(int,input().split())
x,y=map(int,input().split())

print((h-x)*(w-y))

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 = [input().split() for l in range(2)]
a = (int)(h[0][0])
b = (int)(h[1][0])
c = (int)(h[0][1])
d = (int)(h[1][1])
ans = (a - b) * (c - d)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(s)

Submission status: Accepted

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

all_cells = (H * W)
checked_as_row = (W * h)
checked_as_col = (H * w)
duplicated_check = (h * w)

# 全マス - 埋めた行 - 埋めた列 + 重複して埋めたマス
rest_cells = all_cells - checked_as_row - checked_as_col + duplicated_check

print(rest_cells)

Submission status: Accepted

Solution code:
h, w = list(map(int, input().split()))
dh, dw = list(map(int, input().split()))

print((h-dh) * (w-dw))

Submission status: Accepted

Solution code:
h_1, w_1 = map(int, input().split())
h_2, w_2 = map(int, input().split())

print((h_1 - h_2)*(w_1 - w_2))

Submission status: Accepted

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

A = H * W #マスの数
A = A - (h * W) #行を黒塗り
A = A - ((H - h) * w) #列を黒塗り

print(A)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
H, W = M()
h, w = M()
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:
#!/usr/bin/env python3

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

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

Submission status: Accepted

Solution code:
import sys
H, W = map(int, sys.stdin.readline().rstrip().split())
h, w = map(int, sys.stdin.readline().rstrip().split())
print((H - h) * (W - w))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys

INF = float('inf')
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


h1, w1 = LI()
h, w = LI()
ans = max(0, (h1 - h) * (w1 - 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:
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:
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())
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
W = W -w

print(H*W)