TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
N = int(input())
if N < 105:
    S = 0
elif N < 135:
    S = 1
elif N < 165:
    S = 2
elif N < 189:
    S = 3
elif N < 195:
    S= 4
else:
    S = 5
print(S)

N = int(input())
if N < 105:
    S = 0
elif N < 135:
    S = 1
elif N < 165:
    S = 2
elif N < 189:
    S = 3
elif N < 195:
    S= 4
else:
    S = 5
print(S)

N = int(input())
if N < 105:
    S = 0
elif N < 135:
    S = 1
elif N < 165:
    S = 2
elif N < 189:
    S = 3
elif N < 195:
    S= 4
else:
    S = 5
print(S)

N = int(input())
if N < 105:
    S = 0
elif N < 135:
    S = 1
elif N < 165:
    S = 2
elif N < 189:
    S = 3
elif N < 195:
    S= 4
else:
    S = 5
print(S)

lst = list(map(int,input().split()))
A = lst[0]
B = lst[1]
S = (A-1)*(B-1)
print(S)

lst = list(map(int,input().split()))
A = lst[0]
B = lst[1]
S = (A-1)*(B-1)
print(S)

lst = list(map(int,input().split()))
A = lst[0]
B = lst[1]
S = (A-1)*(B-1)
print(S)

lst = list(map(int,input().split()))
A = lst[0]
B = lst[1]
S = (A-1)*(B-1)
print(S)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
a,b = map(int, input ().split ())
print ((a-1)*(b-1)+1)

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
if(N<105):
  print(0)
elif(105<=N<165):
  print(1)
elif(165<=N<195):
  print(2)
else:
  print(3)

N=int(input())
if(N<105):
  print(0)
elif(105<=N<165):
  print(1)
elif(165<=N<195):
  print(2)
else:
  print(3)

N=int(input())
if(N<105):
  print(0)
elif(105<=N<135):
  print(1)
elif(135<=N<165):
  print(2)
elif(165<=N<189):
  print(3)
elif(189<=N<195):
  print(4)
else:
  print(5)

N=int(input())
if(N<105):
  print(0)
elif(105<=N<135):
  print(1)
elif(135<=N<165):
  print(2)
elif(165<=N<189):
  print(3)
elif(189<=N<195):
  print(4)
else:
  print(5)

N=int(input())
if(N<105):
  print(0)
elif(105<=N<135):
  print("1")
elif(135<=N<165):
  print("2")
elif(165<=N<189):
  print("3")
elif(189<=N<195):
  print("4")
else:
  print("5")

N=int(input())
if(N<105):
  print(0)
elif(105<=N<135):
  print("1")
elif(135<=N<165):
  print("2")
elif(165<=N<189):
  print("3")
elif(189<=N<195):
  print("4")
else:
  print("5")

N=int(input())
if(N<105):
  print(0)
elif(105<=N<165):
  print(1)
elif(165<=N<195):
  print(2)
else:
  print(3)

N=int(input())
if(N<105):
  print(0)
elif(105<=N<165):
  print(1)
elif(165<=N<195):
  print(2)
else:
  print(3)

N=int(input())
if(N<105):
  print(0)
elif(105<=N<135):
  print(1)
elif(135<=N<165):
  print(2)
elif(165<=N<189):
  print(3)
elif(189<=N<195):
  print(4)
else:
  print(5)

N=int(input())
if(N<105):
  print(0)
elif(105<=N<135):
  print(1)
elif(135<=N<165):
  print(2)
elif(165<=N<189):
  print(3)
elif(189<=N<195):
  print(4)
else:
  print(5)

N=int(input())
if(N<105):
  print(0)
elif(105<=N<135):
  print("1")
elif(135<=N<165):
  print("2")
elif(165<=N<189):
  print("3")
elif(189<=N<195):
  print("4")
else:
  print("5")

N=int(input())
if(N<105):
  print(0)
elif(105<=N<135):
  print("1")
elif(135<=N<165):
  print("2")
elif(165<=N<189):
  print("3")
elif(189<=N<195):
  print("4")
else:
  print("5")

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
a,b = map(int, input().split())

print(a*b-a-b)

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

print(a*b-a-b)

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

print(a*b a-b)

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

print(a*b a-b)

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

print(a*b-a-b)

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

print(a*b-a-b)

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

print(a*b a-b)

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

print(a*b a-b)

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
def actual(a, b):
    return (a - 1) * (b - 1)

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

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

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

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

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

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

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

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

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


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

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


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

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


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

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
a,b=map(int,input().split());print(a*b-a+b+1)

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
s=str(input())
k=int(input())

res=''

if len(s)>=k:
	for i in range(k):
		if s[i]!=1:
			res=s[i]			
			break
		if i==k-1:
			res='1'
else:
	for i in range(len(s)):
		if s[i]!='1':
			res=s[i]
			break

print(res)

s=str(input())
k=int(input())

res=''

if len(s)>=k:
	for i in range(k):
		if s[i]!=1:
			res=s[i]			
			break
		if i==k-1:
			res='1'
else:
	for i in range(len(s)):
		if s[i]!='1':
			res=s[i]
			break

print(res)

s=str(input())
k=int(input())

res=''

if len(s)>=k:
	for i in range(k):
		if s[i]!=1:
			res=s[i]			
			break
		if i==k-1:
			res='1'
else:
	for i in range(len(s)):
		if s[i]!='1':
			res=s[i]
			break

print(res)

s=str(input())
k=int(input())

res=''

if len(s)>=k:
	for i in range(k):
		if s[i]!=1:
			res=s[i]			
			break
		if i==k-1:
			res='1'
else:
	for i in range(len(s)):
		if s[i]!='1':
			res=s[i]
			break

print(res)

r,c=map(int,input().split())
res=(r-1)*(c-1)
print(res)

r,c=map(int,input().split())
res=(r-1)*(c-1)
print(res)

r,c=map(int,input().split())
res=(r-1)*(c-1)
print(res)

r,c=map(int,input().split())
res=(r-1)*(c-1)
print(res)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
a=int(input())
b=int(input())
print((a-1)*(b-1))


a=int(input())
b=int(input())
print((a-1)*(b-1))


a=int(input())
b=int(input())
print((a-1)*(b-1))


a=int(input())
b=int(input())
print((a-1)*(b-1))


[a,b]=[int(i) for i in input().split()]
print((a-1)*(b-1))


[a,b]=[int(i) for i in input().split()]
print((a-1)*(b-1))


[a,b]=[int(i) for i in input().split()]
print((a-1)*(b-1))


[a,b]=[int(i) for i in input().split()]
print((a-1)*(b-1))


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
A,B=map(int.input().split())

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
A, B = int(input()), int(input())
print((A-1) * (B-1))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
print((a - 1) * (b - 1))

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
a, b = map(int, input().split())
print((a-1)*(b-1)

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
print((int(input)-1)*(int(input)-1))

print((int(input)-1)*(int(input)-1))

print((int(input())-1)*(int(input())-1))


print((int(input())-1)*(int(input())-1))


print((int(input)-1)*(int(input)-1))

print((int(input)-1)*(int(input)-1))

print((int(input())-1)*(int(input())-1))


print((int(input())-1)*(int(input())-1))


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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
a=int(input())
b=int(input())

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

a=int(input())
b=int(input())

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

a=int(input())
b=int(input())

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

a=int(input())
b=int(input())

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
A,B = map(int(input().split()))
ans = (A-1)*(B-1)
print(ans)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
x = input()
y = x.split(" ")
y = [int(x) for x in y]
a = y[0]
b = y[1]
total = a * b
roads = a*1 + b*1 - 1
rem = total - roads
rem = int(rem)
print(rem)
print("In this case, the area is", rem, "square yards.")

x = input()
y = x.split(" ")
y = [int(x) for x in y]
a = y[0]
b = y[1]
total = a * b
roads = a*1 + b*1 - 1
rem = total - roads
rem = int(rem)
print(rem)
print("In this case, the area is", rem, "square yards.")

x = input()
y = x.split(" ")
y = [int(x) for x in y]
a = y[0]
b = y[1]
total = a * b
roads = a*1 + b*1 - 1
rem = total - roads
rem = int(rem)
print(rem)
print("In this case, the area is", rem, "square yards.")

x = input()
y = x.split(" ")
y = [int(x) for x in y]
a = y[0]
b = y[1]
total = a * b
roads = a*1 + b*1 - 1
rem = total - roads
rem = int(rem)
print(rem)
print("In this case, the area is", rem, "square yards.")

x = input()
y = x.split(" ")
A = int(y[0])
B = int(y[1])
total = A * B
roads = A + B - 1
rem = total - roads
rem = int(rem)
print(rem)


x = input()
y = x.split(" ")
A = int(y[0])
B = int(y[1])
total = A * B
roads = A + B - 1
rem = total - roads
rem = int(rem)
print(rem)


x = input()
y = x.split(" ")
A = int(y[0])
B = int(y[1])
total = A * B
roads = A + B - 1
rem = total - roads
rem = int(rem)
print(rem)


x = input()
y = x.split(" ")
A = int(y[0])
B = int(y[1])
total = A * B
roads = A + B - 1
rem = total - roads
rem = int(rem)
print(rem)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
a,b = map(int,input().split(‘ ‘))
print((a - 1) * (b - 1))

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

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

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

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

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

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

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

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

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

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

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

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


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


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


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
print ((int(input())-1) * (int(input())-1))

print ((int(input())-1) * (int(input())-1))

print ((int(input())-1) * (int(input())-1))

print ((int(input())-1) * (int(input())-1))

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
b, c = map(int, input().split())
print(B*C-B-C+1)

b, c = map(int, input().split())
print(B*C-B-C+1)

b, c = map(int, input().split())
print(B*C-B-C+1)

b, c = map(int, input().split())
print(B*C-B-C+1)

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
total=0
for i in range(1,n+1,2):
  ans=0
  for j in range(1,i+1):
    if i%j==0:
      ans+=1
  if ans==8:
    total+=1
print(total)


n=int(input())
total=0
for i in range(1,n+1,2):
  ans=0
  for j in range(1,i+1):
    if i%j==0:
      ans+=1
  if ans==8:
    total+=1
print(total)


n=int(input())
total=0
for i in range(1,n+1,2):
  ans=0
  for j in range(1,i+1):
    if i%j==0:
      ans+=1
  if ans==8:
    total+=1
print(total)


n=int(input())
total=0
for i in range(1,n+1,2):
  ans=0
  for j in range(1,i+1):
    if i%j==0:
      ans+=1
  if ans==8:
    total+=1
print(total)


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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
import math
S = input()
K = int(input())

ps = []

for s in S:
    i = int(s)
    if(i == 1):
        p = -1
    else:
        p = 5*(10**15) * math.log(i)
    ps.append(p)

sum = 0
index = 0
    
if K == 1:
    print(S[0])
else:
    for p in ps:

        if not p == -1:
            sum += p
        else:
            K -= 1

        if math.log(K) < sum:
            #print(index)
            print(S[index])
            break
        index += 1



import math
S = input()
K = int(input())

ps = []

for s in S:
    i = int(s)
    if(i == 1):
        p = -1
    else:
        p = 5*(10**15) * math.log(i)
    ps.append(p)

sum = 0
index = 0
    
if K == 1:
    print(S[0])
else:
    for p in ps:

        if not p == -1:
            sum += p
        else:
            K -= 1

        if math.log(K) < sum:
            #print(index)
            print(S[index])
            break
        index += 1



import math
S = input()
K = int(input())

ps = []

for s in S:
    i = int(s)
    if(i == 1):
        p = -1
    else:
        p = 5*(10**15) * math.log(i)
    ps.append(p)

sum = 0
index = 0
    
if K == 1:
    print(S[0])
else:
    for p in ps:

        if not p == -1:
            sum += p
        else:
            K -= 1

        if math.log(K) < sum:
            #print(index)
            print(S[index])
            break
        index += 1



import math
S = input()
K = int(input())

ps = []

for s in S:
    i = int(s)
    if(i == 1):
        p = -1
    else:
        p = 5*(10**15) * math.log(i)
    ps.append(p)

sum = 0
index = 0
    
if K == 1:
    print(S[0])
else:
    for p in ps:

        if not p == -1:
            sum += p
        else:
            K -= 1

        if math.log(K) < sum:
            #print(index)
            print(S[index])
            break
        index += 1



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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
aa, b = map(int, input().split())
if a == 2 or b == 2:
    print(1)
else:
    print(a*b - (a + b - 1))


aa, b = map(int, input().split())
if a == 2 or b == 2:
    print(1)
else:
    print(a*b - (a + b - 1))


aa, b = map(int, input().split())
if a == 2 or b == 2:
    print(1)
else:
    print(a*b - (a + b - 1))


aa, b = map(int, input().split())
if a == 2 or b == 2:
    print(1)
else:
    print(a*b - (a + b - 1))


a, b = map(int, input().split())
if a == 2 or b == 2:
    print(1)
else:
    print(a*b - (a + b - 1))


a, b = map(int, input().split())
if a == 2 or b == 2:
    print(1)
else:
    print(a*b - (a + b - 1))


a, b = map(int, input().split())
if a == 2 or b == 2:
    print(1)
else:
    print(a*b - (a + b - 1))


a, b = map(int, input().split())
if a == 2 or b == 2:
    print(1)
else:
    print(a*b - (a + b - 1))


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
A = int(input())
B = int(input())
print((A - 1) * (B - 1))

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
A,B = map(int,input().split())
print((A*B)-A-B+(A*B))


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


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


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


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


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


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


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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
A=int(input())
B=int(input())
print(A*B-(A+B-1))

A=int(input())
B=int(input())
print(A*B-(A+B-1))

A=int(input())
B=int(input())
print(A*B-(A+B-1))

A=int(input())
B=int(input())
print(A*B-(A+B-1))

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
x = int(input())
y = int(input())

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

x = int(input())
y = int(input())

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

x = int(input())
y = int(input())

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

x = int(input())
y = int(input())

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

x = int(input())
y = int(input())

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

x = int(input())
y = int(input())

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

x = int(input())
y = int(input())

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

x = int(input())
y = int(input())

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

A = list(map(int, input().split()))
x = A[0]
y = A[1]

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

A = list(map(int, input().split()))
x = A[0]
y = A[1]

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

A = list(map(int, input().split()))
x = A[0]
y = A[1]

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

A = list(map(int, input().split()))
x = A[0]
y = A[1]

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
a, b = map(int,input().split())
print(str(a * b))

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
a, b = map(int, input().split())

area = (a - 1) * (b - 1)
prin(area)

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

area = (a - 1) * (b - 1)
prin(area)

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

area = (a - 1) * (b - 1)
prin(area)

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

area = (a - 1) * (b - 1)
prin(area)

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

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


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

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


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

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


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

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
A=int(input())
B=int(input())

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

A=int(input())
B=int(input())

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

A=int(input())
B=int(input())

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

A=int(input())
B=int(input())

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
a=[105,135,165,195,189]
for i in renge(5):
 if n>=a[i]:
  s=i+1
print(s)

n=int(input())
a=[105,135,165,195,189]
for i in renge(5):
 if n>=a[i]:
  s=i+1
print(s)

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

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

n=int(input())
a=[105,135,165,195,189]
for i in renge(5):
 if n>=a[i]:
  s=i+1
print(s)

n=int(input())
a=[105,135,165,195,189]
for i in renge(5):
 if n>=a[i]:
  s=i+1
print(s)

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
n,m,q = input().split()
list = []
for i in range(int(m)):
    l,r = input().split()
    list.append([int(l),int(r)])
for i in range(int(q)):
    p,q = input().split()
    count = 0
    for j in range(len(list)):
        if int(p) <= list[j][0] and int(q) >= list[j][1]:
            count += 1
    print(count)

n,m,q = input().split()
list = []
for i in range(int(m)):
    l,r = input().split()
    list.append([int(l),int(r)])
for i in range(int(q)):
    p,q = input().split()
    count = 0
    for j in range(len(list)):
        if int(p) <= list[j][0] and int(q) >= list[j][1]:
            count += 1
    print(count)

n,m,q = input().split()
list = []
for i in range(int(m)):
    l,r = input().split()
    list.append([int(l),int(r)])
for i in range(int(q)):
    p,q = input().split()
    count = 0
    for j in range(len(list)):
        if int(p) <= list[j][0] and int(q) >= list[j][1]:
            count += 1
    print(count)

n,m,q = input().split()
list = []
for i in range(int(m)):
    l,r = input().split()
    list.append([int(l),int(r)])
for i in range(int(q)):
    p,q = input().split()
    count = 0
    for j in range(len(list)):
        if int(p) <= list[j][0] and int(q) >= list[j][1]:
            count += 1
    print(count)

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
ans = 0
for i in range(1, N + 1, 2):
    cnt = 0
    for j in range(1, i + 1):
        if not i % j: cnt += 1
    if cnt == 8: ans += 1
print(ans)


N = int(input())
ans = 0
for i in range(1, N + 1, 2):
    cnt = 0
    for j in range(1, i + 1):
        if not i % j: cnt += 1
    if cnt == 8: ans += 1
print(ans)


N=int(input())
ans=0
for i in range(1,N + 1,2):
    cnt=0
    for j in range(1,i+1):
        if not i%j:
          cnt+=1
    if cnt==8:
      ans += 1
print(ans)


N=int(input())
ans=0
for i in range(1,N + 1,2):
    cnt=0
    for j in range(1,i+1):
        if not i%j:
          cnt+=1
    if cnt==8:
      ans += 1
print(ans)


N = int(input())
ans = 0
for i in range(1, N + 1, 2):
    cnt = 0
    for j in range(1, i + 1):
        if not i % j: cnt += 1
    if cnt == 8: ans += 1
print(ans)


N = int(input())
ans = 0
for i in range(1, N + 1, 2):
    cnt = 0
    for j in range(1, i + 1):
        if not i % j: cnt += 1
    if cnt == 8: ans += 1
print(ans)


N=int(input())
ans=0
for i in range(1,N + 1,2):
    cnt=0
    for j in range(1,i+1):
        if not i%j:
          cnt+=1
    if cnt==8:
      ans += 1
print(ans)


N=int(input())
ans=0
for i in range(1,N + 1,2):
    cnt=0
    for j in range(1,i+1):
        if not i%j:
          cnt+=1
    if cnt==8:
      ans += 1
print(ans)


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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,99,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
    if count == 8:
      ans += 1
print(ans)

n = int(input())
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,99,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
    if count == 8:
      ans += 1
print(ans)

n = int(input())
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,99,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
    if count == 8:
      ans += 1
print(ans)

n = int(input())
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,99,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
    if count == 8:
      ans += 1
print(ans)

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
print(A*B-A-B+1)


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


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


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


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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
a = int(input())
b = int(input())

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

a = int(input())
b = int(input())

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

a = int(input())
b = int(input())

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

a = int(input())
b = int(input())

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
print((A-1)*(B-1))

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

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

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

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


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


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


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())

if N <= 104 and N >= 1:
  print(0)
elif N >= 105:
  print(1)
elif N >= 135:
  print(2)
elif N >= 145:
  print(3)
elif N >= 165:
  print(4)
elif N >= 189:
  print(5)
elif N >= 195:
  print(6)

N = int(input())

if N <= 104 and N >= 1:
  print(0)
elif N >= 105:
  print(1)
elif N >= 135:
  print(2)
elif N >= 145:
  print(3)
elif N >= 165:
  print(4)
elif N >= 189:
  print(5)
elif N >= 195:
  print(6)

N = int(input())

if N <= 104 and N >= 1:
  print(0)
elif N >= 105:
  print(1)
elif N >= 135:
  print(2)
elif N >= 145:
  print(3)
elif N >= 165:
  print(4)
elif N >= 189:
  print(5)
elif N >= 195:
  print(6)

N = int(input())

if N <= 104 and N >= 1:
  print(0)
elif N >= 105:
  print(1)
elif N >= 135:
  print(2)
elif N >= 145:
  print(3)
elif N >= 165:
  print(4)
elif N >= 189:
  print(5)
elif N >= 195:
  print(6)

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
A, B = input().split()
print((A-1)*(B-1))

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
A = int(input())
B = int(input())

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

A = int(input())
B = int(input())

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

A = int(input())
B = int(input())

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

A = int(input())
B = int(input())

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
k=int(input())
if k==1:
    print(s[0])
else:
    if s[0]=="1":
        if k < =(10**18):
            print(s[1])
        else:
            print(s[2])
    else:
        if k < =(10**18):
            print(s[0])
        else:
            print(s[1])
            

s=input()
k=int(input())
if k==1:
    print(s[0])
else:
    if s[0]=="1":
        if k < =(10**18):
            print(s[1])
        else:
            print(s[2])
    else:
        if k < =(10**18):
            print(s[0])
        else:
            print(s[1])
            

s=input()
k=int(input())
if k==1:
    print(s[0])
else:
    if s[0]=="1":
        if k < =(10**18):
            print(s[1])
        else:
            print(s[2])
    else:
        if k < =(10**18):
            print(s[0])
        else:
            print(s[1])
            

s=input()
k=int(input())
if k==1:
    print(s[0])
else:
    if s[0]=="1":
        if k < =(10**18):
            print(s[1])
        else:
            print(s[2])
    else:
        if k < =(10**18):
            print(s[0])
        else:
            print(s[1])
            

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted