Problem:


﻿Score: 100 points

Problem Statement

There is a farm whose length and width are A yard and B yard, respectively. A farmer, John, made a vertical road and a horizontal road inside the farm from one border to another, as shown below: (The gray part represents the roads.)

What is the area of this yard excluding the roads? Find it.

Note

It can be proved that the positions of the roads do not affect the area.

Constraints

A is an integer between 2 and 100 (inclusive).

B is an integer between 2 and 100 (inclusive).

Input

Input is given from Standard Input in the following format:

A B

Output

Print the area of this yard excluding the roads (in square yards).

Sample Input 1

2 2

Sample Output 1

1

In this case, the area is 1 square yard.

Sample Input 2

5 7

Sample Output 2

24

In this case, the area is 24 square yards. 



Sample input:
2 2


Sample output:
1

Submission status: Accepted

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

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

Submission status: Accepted

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

a, b = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

a,b=map(int,input().split())
print((a-1)*(b-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a, b = map(int, input().split())
print((a-1)*(b-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())
    print((A-1)*(B-1))
main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
ans = A*B-(A*1+B*1-1)
print(ans)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(A*B-(A+B-1))

Submission status: Accepted

Solution code:
def main():
    from builtins import int, map, list, print
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    A, B = input_number_list()
    print((A - 1) * (B - 1))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Garden

A, B = map(int, input().split())
print((A-1)*(B-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

X, Y = map(int, input().split())

print((X - 1) * (Y - 1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

a,b = i2()
print(a*b - (1*a + 1*b - 1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
print(A*B-(A+B-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input().split()
a, b = int(n[0]), int(n[1])
print(a*b - a -b +1)

Submission status: Accepted

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

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

Submission status: Accepted

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

area = a * b
ans = area - (a + b) + 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

s = (a - 1) * (b - 1)

print(s)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ab = input()
ab_lis = ab.split()
a = int(ab_lis[0])
b = int(ab_lis[1])

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

Submission status: Accepted

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

def main():
    a, b = map(int, input().split())
    print((a - 1) * (b - 1))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
print((a[0]-1)*(a[1]-1))

Submission status: Accepted

Solution code:
def actual(a, b):
    return (a - 1) * (b - 1)

a, b = map(int, input().split())
print(actual(a, b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    a, b = map(int, input().split())
    print((a-1) * (b-1))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
print((lambda a, b: (a - 1) * (b - 1))(*map(int, input().split())))

Submission status: Accepted

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

print(int((A-1)*(B-1)))

Submission status: Accepted

Solution code:
from sys import  stdin
A, B = [int(x) for x in stdin.readline().rstrip().split()]
print((A-1)*(B-1))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(A * B - A - B + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print(A*B-B-A+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print(A*B-A-B+1)

Submission status: Accepted

Solution code:

a,b=map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))
print((A-1)*(B-1))

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

# check
print((A - 1) * (B - 1))

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(A * B - (A+B-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,i=map(int,input().split())
print((N-1)*(i-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
	a, b = map(int, input().split())
	print(a*b - (a+b-1))
resolve()

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
print((n-1)*(m-1))

Submission status: Accepted

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

Submission status: Accepted

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

# map(int, input().rstrip().split())

def VI(N, init=0):
  return [init for _ in range(N)]
def VVI(N, M, init=0):
  return [[init for _ in range(M)] for _ in range(N)]

def VD(N, init=0.0):
  return [init for _ in range(N)]
def VVD(N, M, init=0.0):
  return [[init for _ in range(M)] for _ in range(N)]

a, b = map(int, input().rstrip().split())

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

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
print((X - 1) * (Y - 1))

Submission status: Accepted

Solution code:
#A
a, b = map(int, input().split())
print(a*b - a - b + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print(A*B-(A+B)+1)

Submission status: Accepted

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

Submission status: Accepted

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

ans = (a - 1) * (b - 1)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: <encoding name> -*-

A, B = map(int, input().split())
print((A - 1) * (B - 1))

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
print((n-1)*(m-1))

Submission status: Accepted

Solution code:
length, width = map(int, input().split())
print((length-1)*(width-1))

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A = np.array(lr())
A -= 1
answer = A.cumprod()[-1]
print(answer)

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18
# ----------------------------------------------------------- #

a, b = Is()
print((a-1)*(b-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = A * B - A - B + 1
print(ans)

Submission status: Accepted

Solution code:
#k=int(input())
a,b=map(int,input().split())
#hl=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

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

Submission status: Accepted

Solution code:
s = list(map(int,input().split()))
print(s[0]*s[1] -(s[0]+s[1]-1))

Submission status: Accepted

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc106
# 11:55-


def main():
    a, b = map(int, input().split())
    return (a-1)*(b-1)


print(main())

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print(A*B-(B+A-1))

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
print((n - 1) * (m - 1))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 15:52:03 2020

@author: shinba
"""

a,b = map(int,input().split())

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

Submission status: Accepted

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

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

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


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

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

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

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

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

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

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

A,B = inputIL()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def main():
    a, b = map(int, input().split())
    ans = a * b - a - b + 1
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    a,b = list(map(int, input().split()))
    print(a*b - (a+b-1))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
print(A*B-A-B+1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ABC_106_A():
    A,B = map(int, input().split())
    print((A-1)*(B-1))

if __name__ == '__main__':

    ABC_106_A()

Submission status: Accepted

Solution code:

def main():
    A,B  = map(int, input().split())
    print((A-1)*(B-1))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]
print(a * b - (a + b - 1))

Submission status: Accepted

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


def solve(A: int, B: int):
    return (A - 1) * (B - 1)


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    print(solve(A, B))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

a, b= map(int, input().split())
print(a*b-a-b+1)

Submission status: Accepted

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

ab = a*b
arbr = a+b

print(ab-arbr+1)

Submission status: Accepted

Solution code:
MOD = 10 ** 9 + 7
INF = 10 ** 11
import sys
sys.setrecursionlimit(100000000)

def main():
    A,B = map(int,input().split())
    print((A - 1)*(B - 1))
if __name__ == '__main__':
    main()

Submission status: Accepted

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

import sys
# import math
# from string import ascii_lowercase, ascii_upper_case, 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 operator import itemgetter              # itemgetter(1), itemgetter('key')
# 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 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 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 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 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 copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)


def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1               # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    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())
    
    
    a, b = mi()
    print((a - 1) * (b - 1))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    ans = solve(a, b)
    print(ans)


def solve(a, b):
    ans = (a - 1) * (b - 1)
    return ans


if __name__ == '__main__':
    main()

Submission status: Accepted

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

s = a*b
print(s+1-a-b)

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
A, B = ri_()
print((A-1)*(B-1))

Submission status: Accepted

Solution code:
A, B = list(map(int,input().split()))
print((A-1)*(B-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(int, input().split())
print(A*B-A-B+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

A, B = map(int, input().split())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, b = map(int, input().split())
print((a-1)*(b-1))

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]
print((a-1)*(b-1))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, b = map(int, input().split())
print(a * b - a - b + 1)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
zentai = a * b
tate = 1 * a
yoko = 1 * b
michi = tate + yoko -1 
hatake = zentai - michi
print(hatake)

Submission status: Accepted

Solution code:
a,b = list(map(int, input().split()))
area = a*b-b*1-a*1+1
print(area)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(A * B - (A + B - 1))

Submission status: Accepted

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

def resolve():
    a,b=map(int, input().split())
    print((a-1)*(b-1))
resolve()

Submission status: Accepted

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

def resolve():
    a,b=map(int, input().split())
    print(a*b-a-b+1)
resolve()

Submission status: Accepted

Solution code:
n, i = map(int, input().split())
print((n-1)*(i-1))

Submission status: Accepted

Solution code:
x = input().split()
a = int(x[0])
b = int(x[1])
print(a*b - ((a+b) - 1))

Submission status: Accepted

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

Submission status: Accepted

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


def solve(A: int, B: int):
    print((A - 1) * (B - 1))


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, B = list(map(int,input().split()))
print(A*B-A-B+1)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
print((n-1)*(k-1))

Submission status: Accepted

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

print((A-1)*(B-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, groupby
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

A, B= MAP()
print((A-1)*(B-1))

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())
    print((A-1)*(B-1))
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,m = map(int,input().split())
print((n-1)*(m-1))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print (A*B-A-B+1)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
sqr = a * b
minus = a+b-1
print(sqr-minus)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

A, B = nm()

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

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    a,b=map(int,input().split())
    print((a-1)*(b-1))

Submission status: Accepted

Solution code:
A,B = map(int,(input().split()))
print(A*B-A-B+1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import collections
import sys
 
#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
 
a,b=MI()
ans=a*b-a-b+1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x = list(map(int,input().split(" ")))
a = x[0]
b = x[1]

menseki = a * b - ( b + a - 1 )
print(menseki)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a,b = map(int,input().split())
print((a-1)*(b-1))

Submission status: Accepted

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

if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m = list(map(int,input().split()))
print((n-1) * (m - 1))

Submission status: Accepted

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

s = (a-1)*(b-1)
print(s)

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
print(A*B-(A+B-1))

Submission status: Accepted

Solution code:


import collections


def solve():

    A, B = map(int, input().split())
    print(A*B-(A+B-1))


if __name__ == "__main__":
    solve()

Submission status: Accepted

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