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:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random

import os
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N = inputInt()
    H = inputInt()
    W = inputInt()
    
    ans = 0
    if N == H:
        if N == W:
            print(1)
        else:
            print(N-W+1)
    else:
        if N == W:
            print(N-H+1)
        else:
            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())

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
h = inp()
w = inp()
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:
# 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:
#Bulletin board
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((1+n-h)*(1+n-w))

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-(w-1))*(n-(h-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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000)
INF = 1<<32


def solve(N: int, H: int, W: int):
    print((N-H+1)*(N-W+1))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    solve(N, H, W)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    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__':
    slove()

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 math

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

th = N - H + 1
tw = N - W + 1
print(th * tw)

Submission status: Accepted

Solution code:
import itertools

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

a = n - h + 1
b = n - w + 1
ans = a * b
print(ans)

Submission status: Accepted

Solution code:

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

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

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

Submission status: Accepted

Solution code:
N,H,W=[int(input()) for i in range(3)]
print((N-H+1)*(N-W+1))

Submission status: Accepted

Solution code:
from sys import stdin

def solve() :
    N = int(stdin.readline().rstrip())
    H = int(stdin.readline().rstrip())
    W = int(stdin.readline().rstrip())

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

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:
n=int(input())
x=int(input())
y=int(input())
x=n-x+1
y=n-y+1
print(x*y)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():

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

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

if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = [int(input()) for i in range(3)]
print((n[0] - n[1] + 1) * (n[0] - n[2] + 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,w,h = [int(input()) for i in range(3)]
print((n-w+1)*(n-h+1))

Submission status: Accepted

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

yoko=N-W+1
tate=N-H+1

print ('{}'.format(tate*yoko))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,H,W=(int(input()) for i in range(3))
print((N-H+1)*(N-W+1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# print(N)
# print(H)
# print(W)

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, fractions, itertools


def solve(N: int, H: int, W: int):
    print((N-H+1) * (N-W+1))
    return


# Generated by 1.1.4 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()
    N = int(next(tokens))  # type: int
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    solve(N, H, W)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# x,y=map(int,input().split())
n=int(input())
h=int(input())
w=int(input())

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

Submission status: Accepted

Solution code:
n, h, w = (int(input()) for i in range(3))
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:
[N,H,W] = [int(input()) for _ in range(3)]
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:
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())
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:
# aising2019A - Bulletin Board
def main():
    n, h, w = list(map(int, [input().rstrip() for _ in range(3)]))
    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())

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

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 = list(map(int,input().split()))
H = list(map(int,input().split()))
W = list(map(int,input().split()))
print((N[0]-H[0]+1)*(N[0]-W[0]+1))

Submission status: Accepted

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

x = n-w+1
y = n-h+1

print(x*y)

Submission status: Accepted

Solution code:
N,H,W = [int(input()) for _ in [0]*3]
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:
n,h,w=[int(input()) for i in range(3)]
print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
n=int(input())
h=int(input())
w=int(input())
if h>n or w>n:
  print(0)
else:
  print((n-h+1)*(n-w+1))

Submission status: Accepted

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

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

sys.setrecursionlimit(2147483647)
INF = float("inf")

N, H, W = [int(sys.stdin.readline()) 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())
answer = (N-H+1) * (N-W+1)
print(answer)

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:
N = int(input())
H = int(input())
W = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
###template###
import sys
input = sys.stdin.readline
def mi(): return map(int, input().split())
###template###

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

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

Submission status: Accepted

Solution code:
N = int(input())
print((N - int(input()) + 1) * (N - int(input()) + 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 = int(input())
H = int(input()) - 1
W = int(input()) - 1
print((N - H) * (N - W))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__=="__main__":
    n = int(input())
    H = int(input())
    W = int(input())
    print((n - H + 1) * (n - W + 1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
H = int(input())
W = int(input())
 
print(int((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)
if ans < 0:
    print('0')
else:
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

out=(n-h+1)*(n-w+1)

print(out)

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

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:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    n = II()
    h = II()
    w = II()
    print((n-h+1)*(n-w+1))
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007


#A
def A():
    n,h,w = IR(3)
    print((n-h+1)*(n-w+1))
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == "__main__":
    A()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=lambda:int(input());b=a();print((-~b-a())*(-~b-a()))

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:
N = int(input())
H = int(input())
W = int(input())

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

print(ans)
print()

Submission status: Accepted

Solution code:
a,b,c=map(int,open(0).read().split())
print((a-b+1)*(a-c+1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


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


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 inint(): return int(input())
n, h, w = inint(), inint(), inint()
print((n-h+1)*(n-w+1))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def read():
    return int(input())


def readlist():
    return list(map(int, input().split()))


def readmap():
    return map(int, input().split())


N = read()
H = read()
W = read()

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

Submission status: Accepted

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

import sys, re
from collections import deque, defaultdict, Counter
from math import sqrt, hypot, factorial, pi, sin, cos, radians
if sys.version_info.minor >= 5: from math import gcd
else: from fractions import gcd 
from heapq import heappop, heappush, heapify, heappushpop
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from functools import reduce, partial
from fractions import Fraction
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def round(x): return int((x*2+1) // 2)
def fermat(x, y, MOD): return x * pow(y, MOD-2, MOD) % MOD
def lcm(x, y): return (x * y) // gcd(x, y)
def lcm_list(nums): return reduce(lcm, nums, 1)
def gcd_list(nums): return reduce(gcd, nums, nums[0])
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

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

H2 = N - H + 1
W2 = N - W + 1
print(H2 * W2)

Submission status: Accepted

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

Submission status: Accepted

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

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

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


def main():
    n = I()
    h = I()
    w = I()

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



print(main())

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve(n, h, w):
    return (n-h+1) * (n-w+1)
assert solve(3,2,3) == 2
n = input()
h = input()
w = input()
print(solve(n, h, w))

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


def main():
    n = int(input())
    h = int(input())
    w = int(input())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
n = int(raw_input())
h = int(raw_input())
w = int(raw_input())

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

Submission status: Accepted

Solution code:
n,h,w=map(int, [input() for i 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) * (n-w+1)
print(ans)

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:
a=int(input())
b=int(input())
c=int(input())
print((a-b+1)*(a-c+1))

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())
#a,b=map(int,input().split()) #横並び
#x=[int(input()) for i in range(3)] #縦に並んだのを配列に
#y=list(map(int,input().split())) #横に並んだのを配列に
print((n-h+1)*(n-w+1))
#print('YNEOS'[1::2])

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 -*-
from sys import stdin

s_in = lambda: stdin.readline()[:-1]  # s = s_in()
d_in = lambda: int(stdin.readline())  # N = d_in()
ds_in = lambda: list(map(int, stdin.readline().split()))  # List = ds_in()


N = d_in()
H = d_in()
W = d_in()
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()) for _ in range(3)]
result = (N - (H - 1)) * (N - (W - 1))
print(result)

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:
N, H, W = [int(input()) for _ in range(3)]

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

Submission status: Accepted

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

# AISing Programming Contest 2019：A - Bulletin Board


def main():
    N = int(raw_input().strip())
    H = int(raw_input().strip())
    W = int(raw_input().strip())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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(raw_input())
H = int(raw_input())
W = int(raw_input())
print (N-H+1)*(N-W+1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, W, H = [int(input()) for _ in range(3)]

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

Submission status: Accepted

Solution code:
import sys

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

    count = 0
    for i in range(0, N):
        for j in range(0, N):
            if i + H <= N and j + W <= N:
                count += 1
    print(count)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
# from collections import Counter, defaultdict

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

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()


N, H, W = [I() for _ in range(3)]
print((N - H + 1) * (N - W + 1))

Submission status: Accepted

Solution code:
from sys import stdin

N = int(stdin.readline())
H = int(stdin.readline())
W = int(stdin.readline())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,h,w = map(int,(input() for _ in range(3)))

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

Submission status: Accepted

Solution code:
import math
n = int(input())
H = int(input())
W = int(input())

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

Submission status: Accepted

Solution code:
from collections import deque
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
n = int(input())
h = int(input())
w = int(input())
print((n+1-h)*(n+1-w))

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
H = int(input())
W = int(input())
w = N - W
h = N - H
ans = (N - H + 1) * (N - W + 1)
print(ans)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
# _*_ coding:utf-8 _*_
#  Atcoder_AiSingPrograming_Contest-A
#  TODO https://aising2019.contest.atcoder.jp/tasks/aising2019_a

def solveProblem(boardLength,Height,Width):
	lastHeight = boardLength+1-Height
	lastWidth = boardLength+1-Width

	if ( 0 < lastHeight ) and ( 0 < lastWidth): #この場合なら1枚以上は掲載できる
		papers = lastHeight * lastWidth
	else: # どちらかが0以下の場合貼ることすら出来ない(マイナスxマイナス＝プラスで勘違いされない)
		papers = 0
	answer = papers
	return answer


if __name__ == '__main__':
	N = int(input())
	H = int(input())
	W = int(input())
	solution = solveProblem(N,H,W)
	print("{}".format(solution))

Submission status: Accepted

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

row = n-h+1
line = n-w+1
ans = row * line

print(ans)

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

def con(a):
    hw = 0
    b = n%a
    if a==1:
        return n
   
    for i in reversed(range(n+1-a,n+1)):
        ans = i/a
        hw+=int(ans)
        if ans<=1:
            break
    return hw

re1 = con(h)
re2 = con(w)
print(re2*re1)

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:
#coding:utf-8
n = input()
h = input()
w = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

ans = h * w
print(ans)

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:
if __name__ == '__main__':
    n = int(input())
    a = int(input())
    b = int(input())
    print((n-a+1)*(n-b+1))

Submission status: Accepted

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

print((squ-h+1)*(squ-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:
n = int(input())
h = int(input())
w = int(input())

yoko_num = n - h + 1
tate_num = n - w + 1
ans = yoko_num * tate_num

print(ans)

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:
# -*- coding UTF-8 -*-
N = int(input())
H = int(input())
W = int(input())
print(int((N-H+1)*(N-W+1)))

Submission status: Accepted

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

a=h-1
b=w-1
f=(n-a)*(n-b)

print(f)

Submission status: Accepted

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

NH = 1
NW = 1

if(N - H != 0):
  NH = N - H + 1
if(N - W != 0):
  NW = N - W + 1

print(NH * NW)

Submission status: Accepted

Solution code:
import sys

lines = sys.stdin.readlines()

N = int(lines[0])
H = int(lines[1])
W = int(lines[2])

p_row = N - H + 1
p_column = N - W + 1

ans = p_row * p_column
print(ans)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

d = a-b+1
c = a-c+1

print(d*c)

Submission status: Accepted

Solution code:
from sys import stdin
import math

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

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

Submission status: Accepted

Solution code:
n = int(input())
row = int(input())
column = int(input())

print((n - row + 1)* (n - column + 1))

Submission status: Accepted

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

if n<h or n<w:
	print("0")

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

Submission status: Accepted

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

#行がいくつ入るか
i = 0
while (h + i) <= n:
 i =  i + 1

#列
j = 1
while (w + j ) <= n:
 j = j +1

print(i*j)

Submission status: Accepted

Solution code:
N= int(input())
H= int(input())
W = int(input())
if N!=H:
    if N!=W:
        print('{}'.format((N-H+1)*(N-W+1)))
    else:
        print('{}'.format((N-H+1)))
elif N!=W:
    print('{}'.format((N-W+1)))
else:
    print('{}'.format((1)))

Submission status: Accepted

Solution code:
l = []

for i in range(3):
    l.append(int(input()))

print((l[0]-l[1]+1)*(l[0]-l[2]+1))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n = int(input())
h = int(input())
w = int(input())

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

Submission status: Accepted

Solution code:
import math

N=int(input())
H=int(input())
W=int(input())
ans_h=0
ans_w=0
for i in range(N):
    if i+H<=N:
        ans_h+=1
for i in range(N):
    if i+W<=N:
        ans_w+=1
print(ans_h*ans_w)

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


def main():
    result = (N - H + 1) * (N - W + 1)
    print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

a = (n-h+1) * (n-w+1)

print(a)