Problem:


Score : 100 points

Problem Statement

In K-city, there are n streets running east-west, and m streets running north-south. Each street running east-west and each street running north-south cross each other. We will call the smallest area that is surrounded by four streets a block. How many blocks there are in K-city?

Constraints

2 ≤ n, m ≤ 100

Input

Input is given from Standard Input in the following format:

n m

Output

Print the number of blocks in K-city.

Sample Input 1

3 4

Sample Output 1

6

There are six blocks, as shown below:

Sample Input 2

2 2

Sample Output 2

1

There are one block, as shown below:



Sample input:
3 4


Sample output:
6

Submission status: Accepted

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

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:
N, M = [int(_) for _ in input().split()]

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

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math

a = input().split()
#y = input().split()

x = int(a[0])
y = int(a[1])
x-=1
y-=1
print(x*y)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n,m =map(int,input().split())
print("{}".format((n-1)*(m-1)))

Submission status: Accepted

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


def main():
    """Function."""
    n, m = map(int, input().split())
    print((n-1) * (m-1))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, M = [int(_) for _ in 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:
n, m = list(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=input().strip().split(" ")

b=[int(i) for i in a]

print((b[0]-1)*(b[1]-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

t = [int(s) for s in input().rstrip().split()]
n = (t[0] - 1) * (t[1] - 1)
print(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m = map(int, input().split( ))
print((n-1)*(m-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
n, m = [int(x) for x in input().split()]
print((n-1) * (m-1))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n,m  = map(int, input().split())

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

Submission status: Accepted

Solution code:
print(eval('~-'+input().replace(' ','*~-')))

Submission status: Accepted

Solution code:
s=1
for i in input().split():s*=~-int(i)
print(s)

Submission status: Accepted

Solution code:
print(eval('('+input().replace(' ','-1)*(')+'-1)'))

Submission status: Accepted

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

Submission status: Accepted

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

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


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v


# Width First Search (+ Distance)
def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk


# Depth First Search (+Distance)
def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


# --------------------------------------------

dp = None


def main():
    n, m = li_input()
    print((n - 1) * (m - 1))


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#69a
n,m=map(int,input().split())
print((n-1)*(m-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
n, m = map(int, input().split())
print((n-1)*(m-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# vim: set fileencoding=utf-8 :
def main():
    n, m = map(int, raw_input().split())

    if n >= 2 and m >= 2:
        print((n-1)*(m-1))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
AtoZ = [chr(i) for i in range(65,65+26)]
atoz = [chr(i) for i in range(97,97+26)]

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

N,M = inpl()
print((N-1)*(M-1))

Submission status: Accepted

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

def main():
    n, m = map(int, input().split())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m = map(int, input().split(" "))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
numone,numtwo = map(int,input().split())
answer = (numone -1) * (numtwo -1)
print(answer)

Submission status: Accepted

Solution code:
#coding:utf-8
n=[int(i) for i in input().split()]
print((n[0]-1)*(n[1]-1))

Submission status: Accepted

Solution code:
r, c = (int(x) for x in raw_input().split())
print (r-1)*(c-1)

Submission status: Accepted

Solution code:
n,m = list(map(int,input().split()))

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

Submission status: Accepted

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

n, m = map(int, input().split())

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

Submission status: Accepted

Solution code:
# input
n, m = map(int, input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ６月５日
a, b = map(int, input().split())
c = (a-1)*(b-1)
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ina,inb = list(map(int,input().split()))
print((ina-1)*(inb-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 -*-

n,m = map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = list(map(lambda x:int(x)-1,input().split()))

print(N[0]*N[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:
n, m = map(int, input().split())
s = (n - 1) * (m - 1)
print(s)

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

n = int(arr_data[0][0])
m = int(arr_data[0][1])


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# AtCoder Beginner Contest
# Problem A

if __name__ == '__main__':
    n, m = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m=[int(i) for i in input().split()]
print((n-1)*(m-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python

import sys

n, m = [int(w) for w in sys.stdin.readline().split()]
a = (n - 1) * (m - 1)
print(a)

Submission status: Accepted

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

n,m = list(map(int,input().split()))

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

Submission status: Accepted

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

ans = (n - 1) * (m - 1)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m=[int(i)-1 for i in input().split()]
print(n*m)

Submission status: Accepted

Solution code:
n,m = map(int, input().split())

ans = (n-1)*(m-1)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
problem = input()
n, m    = problem.split()

print((int(n)-1) * (int(m)-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
idx = input()
nm = idx.split()

n = int(nm[0]) - 1
m = int(nm[1]) - 1

print(n * m)

Submission status: Accepted

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

n, m = map(int, input().split(" "))
print((n - 1) * (m - 1))

Submission status: Accepted

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

print((a[0]-1)*(a[1]-1))

Submission status: Accepted

Solution code:
n, m = map(int, input().split())

area = (n+1) * (m+1)
o = m * 2 + (n) * 2
print(area - o)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
n, m = [int(x) for x in raw_input().split()]
print (n - 1) * (m - 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = input().split()
num = [int(x) for x in num]
print((num[0]-1) * (num[1]-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

n, m = map(int, input().split())
#print('\n')

result = (n - 1) * (m - 1)

print("{0}".format(result))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = raw_input()
s = s.split(' ')
s = [int(x) for x in s]
n, m = s

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

Submission status: Accepted

Solution code:
def read_int_list():
    return (int(i) for i in input().split())

n, m = read_int_list()
print((n-1)*(m-1))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
http://abc069.contest.atcoder.jp/tasks/abc069_a
"""


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict
from itertools import product, groupby
from math import pi
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = 10 ** 10


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
a,b= map(int, input().split())
print((a-1)*(b-1))

Submission status: Accepted

Solution code:
astr = input().split()
anum = []
for i in astr:
    anum.append(int(i))
print((anum[0]-1)*(anum[1]-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(): # 069A - K-City
    n, m = list(map(int, input().split()))
    print((m-1) * (n-1))


solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n, m = map(int, raw_input().split())

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m = list(map(int, input().split()))

n -= 1
m -= 1

print (str(n * m))

Submission status: Accepted

Solution code:




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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m  = (int(i) for i in input().split())
if m > 1:
	gaiku = (n-1)*(m-1)
print(gaiku)

Submission status: Accepted

Solution code:
nm=(input()).split(' ')
print(((int)(nm[0])-1)*((int)(nm[1])-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m = map(int, raw_input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
(n, m) = tuple(map(int, input().split(" ")))
print((n-1) * (m-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
gosa = 1.0 / 10**9
mod = 10**9 + 7

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 main():
    n,m = LI()

    return (n-1)*(m-1)



print(main())

Submission status: Accepted

Solution code:
n ,m = [int(i) for i in input().split()]
print((n - 1) * (m - 1))

Submission status: Accepted

Solution code:
n, m = map(int, input().split(" "))


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def read(): return list(map(int, input().split()))

n, m = read()
print((n - 1) * (m - 1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABc069A

n,m=map(int,raw_input().split())
print (n-1)*(m-1)

Submission status: Accepted

Solution code:
n,m = map(int,input().split())

print("%d" % ((n-1) * (m-1)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())

ans=(n-1)*(m-1)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m = list(map(int, input().split()))

ans = (n-1)*(m-1)

print(ans)

Submission status: Accepted

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

n, m = map(int, raw_input().split())
area = (n-1) * (m-1)
print area

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i=[int(x)-1 for x in input().split()]
print(i[0]*i[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[n,m]=[int(i) for i in input().split()]
print((n-1)*(m-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m = [int(e) for e in input().split()]
print((n - 1) * (m - 1))

Submission status: Accepted

Solution code:
# coding: utf-8

n, m = tuple(map(int, input().split()))
print((n - 1) * (m - 1))

Submission status: Accepted

Solution code:
a = list(map((int),input().split(' ')))
n = a[0]
m = a[1]

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 = input().split()
print((int(a[0])-1)*(int(a[1])-1))

Submission status: Accepted

Solution code:

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

if __name__=="__main__":
    input = raw_input().split(" ")
    print Solution((int)(input[0]), (int)(input[1]))

Submission status: Accepted

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

N, M = map(int, input().split())
print((N-1) * (M-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

# sys.stdin = open('a1.in')


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


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n, m = read_int_list()
    res = (n - 1) * (m - 1)
    print(res)

main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = list(map(int, input().split()))
    print((N[0] - 1) * (N[1] - 1))

Submission status: Accepted

Solution code:
n, m = map(int,input().split(" "))

result = (n-1) * (m-1)

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n, m = [int(i) for i in input().split()]
    #print(n, m)
    print((n-1) * (m-1))

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
a=input()
b=a.split()
n=int(b[0])
m=int(b[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

n, m = map(int, raw_input().split())
print ((n+1)*(m+1))-(n*2+m*2)

Submission status: Accepted

Solution code:
n, m = map(int, input().split())		# 5 7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    for line in sys.stdin:
        n, m = map(lambda x: int(x), line.rstrip("\n").split(" ", 2))
        print((n - 1) * (m - 1))

if __name__ == "__main__":
    main(sys.argv)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = input().split()
n = int(l[0])
m = int(l[1])
print((n-1) * (m-1))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
input_cl = input().split()
input_cl = [int(i) for i in input_cl]
n = input_cl[0]
m = input_cl[1]
sector = (n-1) * (m-1)
print(sector)

Submission status: Accepted

Solution code:
import sys


def main():
    args = sys.stdin.readline().split()
    n = int(args[0])
    m = int(args[1])

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

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def main():
    n, m = (int(x) for x in input().split())
    n += 1
    m += 1

    print(n * m - 2 * (n + m) + 4)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

print((x - 1) * (y - 1))

Submission status: Accepted

Solution code:
nm = input().split(' ')
print((int(nm[0])-1) * (int(nm[1])-1))

Submission status: Accepted

Solution code:
#! -*- coding:utf-8 -*-
n,m = map(int,input().split())
print((m-1)*(n-1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import numpy as np
n, m = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

nm = raw_input()
nm = nm.split()
nm = map(int, nm)



if nm[0] < 2 or nm[1] < 2:
    ans = 0
else:
    ans = (nm[0]-1)*(nm[1]-1)

print ans

Submission status: Accepted

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

a()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N, M = map(int, input().split())

    ans = (N - 1) * (M - 1)
    print(ans)

main()

Submission status: Accepted

Solution code:
temp_arr = input().split(' ')
n = int(temp_arr[0])
m = int(temp_arr[1])

print(str((n-1) * (m-1)))

Submission status: Accepted

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

Submission status: Accepted

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

print(output)

Submission status: Accepted

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

Submission status: Accepted

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

n, m = [int(x) for x in input().split()]
cities = (n-1) * (m-1)
print(cities)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m = map(int,input().split())

A=(n-1)*(m-1)
print(A)

Submission status: Accepted

Solution code:
n, m = map(int, input().split())

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

Submission status: Accepted

Solution code:
n,m = input().split()
n = int(n)
m = int(m)

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

Submission status: Accepted

Solution code:
# K-City
n,m = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
nums = [int(x) for x in input().split()]
n,m = nums[0]-1,nums[1]-1
print(n*m)

Submission status: Accepted

Solution code:
# encoding:utf-8
 
def main():
	n, m = list(map(int, input().split()))
	print((n - 1) * (m - 1))
		
if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_line = map(int,raw_input().split(" "))
n = input_line[0]
m = input_line[1]

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

Submission status: Accepted

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

import sys
import re
import math
import collections
import itertools
import functools

DEBUG = True
DEBUG = False

def dbg(*args):
    if DEBUG:
        print("DBG: ", file=sys.stderr, end="")
        print(*args, file=sys.stderr)



def main():
    N, M = map(int, input().split())

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

if __name__ == "__main__": main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, m = [map(int, input().split()) for i in range(2)]
print((n-1)*(m-1))

Submission status: Runtime Error

Solution code:
n, m = [int(input()) for i in range(2)]
print((n-1)*(m-1))

Submission status: Runtime Error

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