Problem:


Score : 100 points

Problem Statement

It has been decided that a programming contest sponsored by company A will be held, so we will post the notice on a bulletin board.

The bulletin board is in the form of a grid with N rows and N columns, and the notice will occupy a rectangular region with H rows and W columns.

How many ways are there to choose where to put the notice so that it completely covers exactly HW squares?

Constraints

1 \leq H, W \leq N \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
H
W

Output

Print the answer.

Sample Input 1

3
2
3

Sample Output 1

2

There are two ways to put the notice, as follows:

###   ...
###   ###
...   ###

Here, # represents a square covered by the notice, and . represents a square not covered.

Sample Input 2

100
1
1

Sample Output 2

10000

Sample Input 3

5
4
2

Sample Output 3

8



Sample input:
3
2
3


Sample output:
2

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations,product#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    N = int(input())
    h=int(input())
    w=int(input())
    #N, K = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列

    print((N-h+1)*(N-w+1))




if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    n,h,w=[int(input()) for _ in range(3)]
    print((n-h+1) * (n-w+1))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    n=int(input())
    h=int(input())
    w=int(input())
    print((n-h+1) * (n-w+1))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

# import bisect
# import numpy as np
# from collections import deque
from collections import deque
# map(int, sys.stdin.read().split())
# import heapq
import bisect


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    H = int(input())
    W = int(input())

    print((N - H + 1) * (N - W + 1))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

ans = (N-H+1) * (N-W+1)
print(ans)

Submission status: Accepted

Solution code:
N,H,W=map(int,open(0))
print((N-H+1)*(N-W+1))

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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
H = INT()
W = INT()

print((N-H+1)*(N-W+1))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    n=II()
    h=II()
    w=II()
    print((n-h+1)*(n-w+1))

main()

Submission status: Accepted

Solution code:
def main():
  n = int(input())
  h = int(input())
  w = int(input())
  print((n - h + 1) * (n - w + 1))
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
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 main():
    mod=10**9+7
    N=I()
    H=I()
    W=I()
    ans=(N-H+1)*(N-W+1)
    print(ans)

main()

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())
print((N - H + 1) * (N - W + 1))

Submission status: Accepted

Solution code:
n = int(input())
h = int(input()) - 1
w = int(input()) - 1
print((n-h)*(n-w))

Submission status: Accepted

Solution code:
def main():
    a=int(input())
    b=int(input())
    c=int(input())
    print((a-b+1)*(a-c+1))

main()

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())
print(max(0, (n - h + 1) * (n - w + 1)))

Submission status: Accepted

Solution code:
n, h, w = map(int, open(0))
print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
n=int(input())
h=n-int(input())+1
w=n-int(input())+1
print(h*w)

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    H = int(input())
    W = int(input())
    print((N-H+1)*(N-W+1))
resolve()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

N = INT()
H = INT()
W = INT()

print((N-H+1)*(N-W+1))

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

res = (N - H + 1) * (N - W + 1)
print(res)

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

print((N-H+1)*(N-W+1))

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############

N,H,W = ILs(3)

print((N-H+1)*(N-W+1))

Submission status: Accepted

Solution code:
n=int(input())
h=int(input())
w=int(input())
ans=(n-h+1)*(n-w+1)
print(ans)

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N = int(readline())
    H = int(readline())
    W = int(readline())
    ans = (N-H+1)*(N-W+1)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
a = int(input())
b = int(input())

ans = (n-a+1)*(n-b+1)

print(ans)

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
n = int(input())
h = int(input())
w = int(input())
print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

print ((N - H + 1) * (N - W + 1))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    H = int(input())
    W = int(input())

    res = (n - H + 1) * (n - W + 1)
    print(res)


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

def solve():
    N = int(input().rstrip())
    H = int(input().rstrip())
    W = int(input().rstrip())
    
    print((H-N)*(W-N) + N - H + N - W + 1)
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())
ans = (N-H+1) * (N-W+1)
print(ans)

Submission status: Accepted

Solution code:
n,h,w = map(int,open(0).read().split())
print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
N=int(input())
H=int(input())
W=int(input())
h=N-H+1
w=N-W+1
print(h*w)

Submission status: Accepted

Solution code:
n = int(input())+1
h = int(input())
w = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())

tate = n-h+1
yoko = n-w+1

print(tate*yoko)

Submission status: Accepted

Solution code:
n=int(input())
h=int(input())
w=int(input())
print((n-h+1)*(n-w+1))

Submission status: Accepted

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

def resolve():
    n=int(input())
    h=int(input())
    w=int(input())
    print((n-h+1)*(n-w+1))
resolve()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

    n=int(input())
    h=int(input())
    w=int(input())

    print((n-h+1)*(n-w+1))

resolve()

Submission status: Accepted

Solution code:
n,h,w=[int(input()) for _ in range(3)];print((n+1-h)*(n+1-w))

Submission status: Accepted

Solution code:
# 1
# https://atcoder.jp/contests/keyence2019/tasks/keyence2019_a
if False:
    print('YES' if set(input().split())==set(list('1974')) else 'NO')

# 2
# https://atcoder.jp/contests/keyence2019/tasks/keyence2019_b
if False:
    S=input()
    ans='NO'
    K='keyence'
    for i in range(len(K)):
        l=K[:i]
        r=K[i:]
        # print(l,r)
        if l in S and r in S:
            l_i=S.index(l)
            for j in range(len(S)):
                # print(S[j:j+len(K)-1])
                if j+len(r)-1<len(S) and S[j:j+len(r)]==r:
                    r_i=j
            # print(l_i,r_i)
            if l_i<=r_i:
                ans='YES'
                break
    print(ans)

# 3
# https://atcoder.jp/contests/aising2019/tasks/aising2019_a
N=int(input())
H=int(input())
W=int(input())
print((N-H+1)*(N-W+1))

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, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

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

    n = int(input())
    h = int(input())
    w = int(input())
    print((n-h+1)*(n-w+1))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())
a = (n-h+1) * (n-w+1)
print(a)

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

if N < W or N < H:
    print(0)
else:
    print((N-W+1)*(N-H+1))

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
h = int(readline())
w = int(readline())
print((n - h + 1) * (n - w + 1))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    h=int(input())
    w=int(input())
    print((n-h+1)*(n-w+1))

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
n, h, w = map(int, open(0))
print((n - ~-h)*(n - ~-w))

Submission status: Accepted

Solution code:
n = int(input())
a = int(input())
b = int(input())
print((n-a+1)*(n-b+1))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())
print((a - b + 1) * (a - c + 1))

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
h = int(stdin.readline().rstrip())
w = int(stdin.readline().rstrip())

print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
n=int(input())
h=int(input())
w=int(input())
a=n-h+1
b=n-w+1
print(a*b)

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

print((N-H+1)*(N-W+1))

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

def solve(i, j):
    for a in range(H):
        for b in range(W):
            if 0 <= i + a < N and 0 <= j + b < N:
                continue
            else:
                return False
    return True

ans = 0

for i in range(N):
    for j in range(N):
        if solve(i, j):
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
# AISing Programming Contest 2019 / エイシング プログラミング コンテスト 2019: A – Bulletin Board	
n, h, w = [int(input()) for _ in range(3)]
print((n - h + 1) * (n - w + 1))

Submission status: Accepted

Solution code:
N=int(input())
H=int(input())
W=int(input())
ans=(N-H)+1
ans*=(N-W)+1
print(ans)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

n, h, w = nin(3)

print((n - h + 1) * (n - w + 1))

Submission status: Accepted

Solution code:
n = int(input())
h = int(input()) #行
w = int(input()) #列

gyou = n - h + 1
retu = n - w + 1

print(gyou * retu)

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = int(input())
    b = int(input())
    c = int(input())
    
    print((a+1-b)*(a+1-c))

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()))
n = ii()
h = ii()
w = ii()

print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())
ans = (N-H+1)*(N-W+1)
          
print(ans)   

#print(*ans, sep='\n')

Submission status: Accepted

Solution code:
N= int(input())
H= int(input())
W= int(input())

print((N-H+1)*(N-W+1))

Submission status: Accepted

Solution code:
n=int(input())
w=int(input())
h=int(input())
print((n - w + 1)*(n - h + 1))

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


N = I()
H = I()
W = I()

print((N - H + 1) * (N - W + 1))

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

print((N - H + 1) * (N - W + 1))

Submission status: Accepted

Solution code:
n,h,w=int(input()),int(input()),int(input())
print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
from math import ceil
n = int(input())
a = int(input())
b = int(input())
print((n - a + 1) * (n - b + 1))

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())
if N > H and N > W:
    print((N-H+1)*(N-W+1))
elif N > H and N == W:
    print(N-H+1)
elif N == H and N > W:
    print(N-W+1)
elif N == H and N == W:
    print(1)

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())
 
print((N-H+1)*(N-W+1))

Submission status: Accepted

Solution code:
n = int(input())
m = int(input())
x = int(input())

print((n - m + 1) * (n - x + 1))

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())
print((n-h+1) * (n-w+1))

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())

print((n - h + 1) * (n - w + 1))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    H = int(input())
    W = int(input())
    print((N-H+1) * (N-W+1))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    board_length = int(input())
    height = int(input())
    width = int(input())
    print((board_length - height + 1) * (board_length - width + 1))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())

print((n-w+1)*(n-h+1))

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    h = int(input())
    w = int(input())
    print((n-h+1)*(n-w+1))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())

hh = n+1-h
ww = n+1-w

print(hh*ww)

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
H = int(stdin.readline().rstrip())
W = int(stdin.readline().rstrip())
print((N - H + 1) * (N - W + 1))

Submission status: Accepted

Solution code:
n=int(input())+1
print((n-int(input()))*(n-int(input())))

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())
print((n-w+1)*(n-h+1))

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())

if n == h == w:
    print(1)
elif n == w:
    print(n-h+1)
elif n == h:
    print(n-w+1)
else:
    print((n-w+1)*(n-h+1))

Submission status: Accepted

Solution code:
n,h,w=[int(input()) for _ in range(3)]
print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
N, H, W = map(int, open(0).read().split())
print((N-H+1)*(N-W+1))

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

h = N - H + 1
w = N - W + 1

print(h*w)

Submission status: Accepted

Solution code:
def main():
  import sys
  n,h,w=map(int,open(0).read().split())
  ans=(n-h+1)*(n-w+1)
  print(ans)
if __name__=="__main__":
  main()

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

h = N - H + 1
w = N - W + 1

print(h*w)

Submission status: Accepted

Solution code:
import sys
import math
import fractions
import bisect
import queue
import heapq
from collections import deque
sys.setrecursionlimit(4100000)

MOD = int(1e9+7)
PI = 3.14159265358979323846264338327950288
INF = 1e18

'''
1行のint
N, K = map(int, input().split())

1行のstring
S, T = input().split()

1行の整数配列
P = list(map(int,input().split()))

改行あり整数
x = []
y = []
for i in range(N):
    x1,y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)

N行M列の初期化
dp = [[INF] * M for i in range(N)]

'''

N = int(input())
H = int(input())
W = int(input())

print((N-H+1)*(N-W+1))

Submission status: Accepted

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

n = int(input())
h = int(input())
w = int(input())
print((n - h + 1) * (n - w + 1))

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())

print((n - w + 1) * (n - h + 1))

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read

N, H, W = map(int, read().split())

print((N - H + 1) * (N - W + 1))

Submission status: Accepted

Solution code:
n=int(input())
horizon=int(input())
width=int(input())

answer=(n-horizon+1)*(n-width+1)
print(answer)

Submission status: Accepted

Solution code:
n=int(input())
h=int(input())
w=int(input())

print((n-w+1)*(n-h+1))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())
print((a-b+1)*(a-c+1))

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def my_round(a,dig=0):
    p = 10 ** dig
    return (a * p * 2 + 1) // 2 / p

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): #最小公倍数
    return a/gcd(a,b)*b

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): #素因数分解
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

def main():
    n = int(input())
    h = int(input())
    w = int(input())
    _h = n - h + 1
    _w = n - w + 1
    print(_h * _w)
    return

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())
r = max(0, n-h+1)
c = max(0, n-w+1)
print(r*c)

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
h = int(stdin.readline().rstrip())
w = int(stdin.readline().rstrip())

print((n-w+1)*(n-h+1))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    H = int(input())
    W = int(input())

    ans = (N+1-H)*(N+1-W)
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
h=int(input())
w=int(input())
print(((n-h)+1)*((n-w)+1))

Submission status: Accepted

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

N = int(input())
H = int(input())
W = int(input())

print((N - H + 1) * (N - W + 1))

Submission status: Accepted

Solution code:
# AtCoder Aithing Contest 2019 - A
# -*- encoding: UTF-8 -*-
n = int(input())
h = int(input())
w = int(input())

px = n - h + 1
py = n - w + 1

p = px * py

print(p)

Submission status: Accepted

Solution code:
N,H,W = int(input()),int(input()),int(input())
print(max(0,N-W+1)*max(0,N-H+1))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())

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

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
c=int(input())
print((a-b+1)*(a-c+1))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#X, Y = map(int, input().split())
N = int(input())
H = int(input())
W = int(input())

print ((N-H+1) * (N-W+1))

Submission status: Accepted

Solution code:
N=int(input())
H=int(input())
W=int(input())

print((N-(H-1))*(N-(W-1)))

Submission status: Accepted

Solution code:
N = int( input() )
H = int( input() )
W = int( input() )

print( (N - H + 1) * (N - W + 1) )

Submission status: Accepted

Solution code:
n,h,w=map(int,open(0))
print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
N=int(input())
H=int(input())
W=int(input())

print ((N-H+1) * (N-W+1))

Submission status: Accepted

Solution code:
def examA():
    N = I(); H = I(); W = I()
    ans = (N-H+1)*(N-W+1)
    print(ans)


import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examA()

Submission status: Accepted

Solution code:
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n = int(input().rstrip('\n'))
    h = int(input().rstrip('\n'))
    w = int(input().rstrip('\n'))
    print((n - h + 1) * (n - w + 1))


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
#coding:utf-8
n = int(input())
h = int(input())
w = int(input())

print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
def main(n, w, h):
    print((n - w + 1) * (n - h + 1))


if __name__ == '__main__':
    n = int(input())
    h = int(input())
    w = int(input())

    main(n, h, w)

Submission status: Accepted

Solution code:
N = int(input())
A = int(input())
B = int(input())

print((N-A+1)*(N-B+1))

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())

hbaf = n - h + 1
wbaf = n - w + 1
print(hbaf*wbaf)

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())
print(max(0, (1 + n - h ) * (1 + n - w)))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
H = int(input())
W = int(input())
print((N - H + 1) * (N - W + 1))

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())

ans = (N - H + 1) * (N - W + 1)
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())

x = n - h + 1
y = n - w + 1
print(x * y)

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())

print((1 + n - h) * (1 + n - w))