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

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
H=int(input())
W=int(input())
print((N//H)*(N//W))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
3
2
3

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(((n//h)+n%h)*((n//w)+n%w))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
H = int(input())
W = int(input())
if(N%H == 0 and N%W == 0):
  print(N**2)
else:
  print(N**2-(W*H)-1)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = int(input())
W = int(input())
if(N//H == 0 and N//W == 0):
  print(N**2)
else:
  print(N**2-(W*H)-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
H = int(input())
W = int(input())
cell = N**2
HW = H * W
if(cell % HW == 0):
  print(cell//HW)
elif(N%W == 0):
  print(H)
else:
  print(HW)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = int(input())
W = int(input())
cell = N**2
HW = H * W
if(cell % HW == 0):
  print(cell//HW)
else:
  h, w = 0, 0
  if(N % H != 0):
    h = 1
    for i in range(1,N//H + 2):
      h *= i
  if(N % W != 0):
    w = 1
    for i in range(1,N//W + 2):
      w *= i
  print(w + h)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = int(input())
W = int(input())
cell = N**2
HW = H * W
if(cell % HW == 0):
  print(cell//HW)
else:
  h, w = 0, 0
  if(N - H != 0):
    h = 1
    for i in range(1,N//H + 2):
      h *= i
  if(N - W != 0):
    w = 1
    for i in range(1,N//W + 2):
      w *= i
  print(w + h)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print((n//h)*((n%h)+1)*(n//w)*((n%w)+1))

Submission status: Wrong Answer

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

print((n//h)*(n%h+1)*(n//w)*(n%w+1))

Submission status: Wrong Answer

Solution code:
N = int(input())
H = int(input())
W = int(input())
cell = N**2
HW = H * W
x = cell//HW
if(cell%HW == 0):
  print(x)
elif(N - W == 0):
  print(H ** x)
else:
  print(W ** x)

Submission status: Wrong Answer

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

if h>n:
    print(0)

print(n//h*(n%h+1)*n//w*(n%w+1))

Submission status: Wrong Answer

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

print("type")
print(type(n))

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

print(ans)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
H = int(input())
W = int(input())
cell = N**2
HW = H * W
if(cell%HW == 0):
  print(cell//HW)
else:
  print(abs((cell // HW)**2 - cell % HW))

Submission status: Wrong Answer

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

NH = 0
NW = 0

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

if(NH == 0 or NW == 0):
  print(NH + NW)
else:
  print(NH * NW)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = int(input())
W = int(input())
cell = N**2
HW = H * W
print(abs(cell % HW - (cell // HW)**2))

Submission status: Wrong Answer

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

d = a-b
c = a-c

print(d*c)

Submission status: Wrong Answer

Solution code:
n = int(input())
h = int(input())
w = int(input())
"""
n = 5
h = 2
w = 2
"""
print("type")
print(type(n))

yoko_num = (n % h)+1
tate_num = (n % w)+1
ans = yoko_num * tate_num

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
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)))
else:
    print('{}'.format((1)))

Submission status: Wrong Answer

Solution code:
n = int(input())
h = int(input())
w = int(input())
count = 0
a = 0
for i in range(n - h + 1):
    for j in range(n // w):
        for k in range(n // w):
            if w + w * k + j <= n and h + i <= n:
                count += 1
print(count)

Submission status: Wrong Answer

Solution code:
from math import *
log = lambda *x: print(*x)

def cin(*fn, def_fn=str):
    i, r = 0, []
    if fn:
        def_fn = fn[0]
    for c in input().split(' '):
        r += [(fn[i] if len(fn) > i else def_fn) (c)]
        i += 1
    return r
##################################################

n, = cin(int)
h, = cin(int)
w, = cin(int)

tw, th = 0, ceil(n/h)

while w <= n:
    tw += 1
    w += 1

log(th * tw)

Submission status: Wrong Answer

Solution code:
N = int(input())
H = int(input())
W = int(input())
print((N / H)*(N / W))

Submission status: Wrong Answer

Solution code:
N = int(input())
H = int(input())
W = int(input())
cell = N**2
HW = H * W
print(abs(cell % HW - cell // HW))

Submission status: Wrong Answer

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


def con(a):
    c1 = int(n/a)
    c2 = n%a
    
    c2+=1
    return c1*c2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

NH = 0
NW = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

NH = 0
NW = 0

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

Submission status: Wrong Answer

Solution code:
5
4
2

Submission status: Wrong Answer

Solution code:
from sys import stdin
N=int(stdin.readline().rstrip())
H=int(stdin.readline().rstrip())
W=int(stdin.readline().rstrip())
ans=int(N/H)*int(N/W)
print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin
N=int(stdin.readline().rstrip())
H=int(stdin.readline().rstrip())
W=int(stdin.readline().rstrip())
ans=int(N/H)*int(W/H)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

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

count_h = 0
count_w = 0

while True:
    nn=n
    if nn>=h:
        nn -=h
        count_h +=1
    elif nn<h or nn==0:
        break

while True:
    nn=n
    if nn>=w:
        nn -=w
        count_w +=1
    elif nn<w or nn==0:
        break

print(count_h * count_w)

Submission status: Accepted

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

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+1-h)*(n+1-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-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+1-H)*(N+1-W))

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

if N<H or N<W:
    print(0)
    exit()

h = N-H
w = N-W
#print(h,w)
print((h+1)*(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

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


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    n, h, w = int(input()), int(input()), 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())
s = n-h+1
t = n-w+1
print(s*t)

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

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())
n = I()
h = I()
w = I()
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((n-h+1)*(n-w+1))

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

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

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:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
h = ri()-1
w = ri()-1
print((n-h) * (n-w))

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

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

if __name__ == '__main__':
    resolve()

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:
#エイシング プログラミング コンテスト 2019 a
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())
print((n - int(input()) + 1) * (n - int(input()) + 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())
ans = (n-w+1)*(n-h+1)
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
h = int(input())
w = int(input())
if n < h or n < w:
    print(0)
else:
    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:
n,h,w = [int(input()) for _ 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 - 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())
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 math
import sys
readline = sys.stdin.readline


def main():
    n = int(input())
    print((n - int(input()) + 1) * (n - int(input()) + 1))


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math
from functools import lru_cache
from collections import deque
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

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

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N, H, W = [ii(), ii(), ii()]
    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 - h + 1) * (n - w + 1))

Submission status: Accepted

Solution code:
# coding: utf-8
#N, h, w = map(int,input().split())
N = int(input())
h = int(input())
w = int(input())
#s = list(map(str,input().split()))
#a, b = map(int,input().split())
#P = list(map(int,input().split()))
ans = 0
if h*w!=0:
    print((N-h+1)*(N-w+1))
else:
    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:
n, h, w = [int(input()) for _ in range(3)]
print((n-h+1)*(n-w+1))

Submission status: Accepted

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

import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union
# import time
# import math, cmath
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import _heapify_max, _heappop_max, _siftdown_max
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import Fraction               # Fraction(a, b) => a / b ∈ Q. note: Fraction(0.1) do not returns Fraciton(1, 10). Fraction('0.1') returns Fraction(1, 10)



def main():
    Num = Union[int, float]
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79e+308
    # inf = 2 ** 63 - 1             # (for fast JIT compile in PyPy) 9.22e+18
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input():  return sys.stdin.readline().rstrip()
    def ii():     return int(input())
    def isp():    return input().split()
    def mi():     return map(int, input().split())
    def mi_0():   return map(lambda x: int(x)-1, input().split())
    def lmi():    return list(map(int, input().split()))
    def lmi_0():  return list(map(lambda x: int(x)-1, input().split()))
    def li():     return list(input())
    def debug(x): print(x, file=sys.stderr)
    # def _heappush_max(h, item): h.append(item); _siftdown_max(h, 0, len(h)-1)
    
    
    n, h, w = ii(), ii(), ii()
    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 = int(input())
h = int(input())
w = int(input())

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

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(max(0,n-w+1)*max(0,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:
# Begin Header {{{
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement
# }}} End Header
# _________コーディングはここから！！___________
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()