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())
num=0
for j in range(1,N+1,2):
  	cnt=0
    for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
#    print("---")
print(num)


N=int(input())
num=0
for j in range(1,N+1,2):
  	cnt=0
    for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
#    print("---")
print(num)


import math

N=int(input())
cnt=0
num=0
for j in range(1,N+2,2):
    for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
    cnt=0
#    print("---")
print(num)

import math

N=int(input())
cnt=0
num=0
for j in range(1,N+2,2):
    for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
    cnt=0
#    print("---")
print(num)

N=int(input())
num=0
for j in range(1,N+1,2):
  	cnt=0
    for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
#    print("---")
print(num)


N=int(input())
num=0
for j in range(1,N+1,2):
  	cnt=0
    for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
#    print("---")
print(num)


import math

N=int(input())
cnt=0
num=0
for j in range(1,N+2,2):
    for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
    cnt=0
#    print("---")
print(num)

import math

N=int(input())
cnt=0
num=0
for j in range(1,N+2,2):
    for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
    cnt=0
#    print("---")
print(num)

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):
inp = input()
n = int(inp)

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)
elif 195 <= n:
  print(5)

inp = input()
n = int(inp)

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)
elif 195 <= n:
  print(5)

inp = input()
n = int(inp)

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)
elif 195 <= n:
  print(5)

inp = input()
n = int(inp)

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)
elif 195 <= n:
  print(5)

inp = input()
inp = inp.split()
men = (int(inp[0]) - 1 ) * (int(inp[1]) - 1)
print(men)

inp = input()
inp = inp.split()
men = (int(inp[0]) - 1 ) * (int(inp[1]) - 1)
print(men)

inp = input()
inp = inp.split()
men = (int(inp[0]) - 1 ) * (int(inp[1]) - 1)
print(men)

inp = input()
inp = inp.split()
men = (int(inp[0]) - 1 ) * (int(inp[1]) - 1)
print(men)

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):
S =int(input())
T=int(input())

print((S-1)*(T-1))

S =int(input())
T=int(input())

print((S-1)*(T-1))

S =int(input())
T=int(input())

print((S-1)*(T-1))

S =int(input())
T=int(input())

print((S-1)*(T-1))

li=list(map(int, input().split()))
print((li[0]-1)*(li[1]-1))

li=list(map(int, input().split()))
print((li[0]-1)*(li[1]-1))

li=list(map(int, input().split()))
print((li[0]-1)*(li[1]-1))

li=list(map(int, input().split()))
print((li[0]-1)*(li[1]-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())
 
ans = 0
s0 = 0
 
for s in S:
    if s == '1':
        s0 += 1
        if s0 == K:break
    else: break
print(s)

S = input()
K = int(input())
 
ans = 0
s0 = 0
 
for s in S:
    if s == '1':
        s0 += 1
        if s0 == K:break
    else: break
print(s)

S = input()
K = int(input())
 
ans = 0
s0 = 0
 
for s in S:
    if s == '1':
        s0 += 1
        if s0 == K:break
    else: break
print(s)

S = input()
K = int(input())
 
ans = 0
s0 = 0
 
for s in S:
    if s == '1':
        s0 += 1
        if s0 == K:break
    else: break
print(s)

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=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):
n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else 2 if n >=n 135 else 1 if n >= 105 else 0)

n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else 2 if n >=n 135 else 1 if n >= 105 else 0)

n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else if 2 if n >= 135 else 1 if n >= 105 else 0)

n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else if 2 if n >= 135 else 1 if n >= 105 else 0)

n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else 2 if n >=n 135 else 1 if n >= 105 else 0)

n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else 2 if n >=n 135 else 1 if n >= 105 else 0)

n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else if 2 if n >= 135 else 1 if n >= 105 else 0)

n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else if 2 if n >= 135 else 1 if n >= 105 else 0)

print((lambda x:(x[0]-1)*(x[1]-1))(list(map(int,input().split()))))

print((lambda x:(x[0]-1)*(x[1]-1))(list(map(int,input().split()))))

print((lambda x:(x[0]-1)*(x[1]-1))(list(map(int,input().split()))))

print((lambda x:(x[0]-1)*(x[1]-1))(list(map(int,input().split()))))

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):
l = int(input().split())
print(l(0) * l(1) - (l(0) + l(1) -1))

l = int(input().split())
print(l(0) * l(1) - (l(0) + l(1) -1))

l = map(int, raw_input().split())
print(l(0) * l(1) - (l(0) + l(1) -1))

l = map(int, raw_input().split())
print(l(0) * l(1) - (l(0) + l(1) -1))

N = int(input())
list = []
for i in range(1, N):
  numbers = []
  for a in range(1, i):
    if i % a == 0:
      numbers.append()
  if len(numbers) == 8:
      list.append(i)
print(len(list))

N = int(input())
list = []
for i in range(1, N):
  numbers = []
  for a in range(1, i):
    if i % a == 0:
      numbers.append()
  if len(numbers) == 8:
      list.append(i)
print(len(list))

l = int(input().split())
print(l[0] * l[1] - (l[0] + l[1] -1))

l = int(input().split())
print(l[0] * l[1] - (l[0] + l[1] -1))

l = input().split()
print(l(0) * l(1) - (l(0) + l(1) -1))

l = input().split()
print(l(0) * l(1) - (l(0) + l(1) -1))

l = map(int, raw_input().split())
print(l(0) * l(1) - (l(0) + l(1) - 1))

l = map(int, raw_input().split())
print(l(0) * l(1) - (l(0) + l(1) - 1))

l = int(input().split())
print(l(0) * l(1) - (l(0) + l(1) -1))

l = int(input().split())
print(l(0) * l(1) - (l(0) + l(1) -1))

l = map(int, raw_input().split())
print(l(0) * l(1) - (l(0) + l(1) -1))

l = map(int, raw_input().split())
print(l(0) * l(1) - (l(0) + l(1) -1))

N = int(input())
list = []
for i in range(1, N):
  numbers = []
  for a in range(1, i):
    if i % a == 0:
      numbers.append()
  if len(numbers) == 8:
      list.append(i)
print(len(list))

N = int(input())
list = []
for i in range(1, N):
  numbers = []
  for a in range(1, i):
    if i % a == 0:
      numbers.append()
  if len(numbers) == 8:
      list.append(i)
print(len(list))

l = int(input().split())
print(l[0] * l[1] - (l[0] + l[1] -1))

l = int(input().split())
print(l[0] * l[1] - (l[0] + l[1] -1))

l = input().split()
print(l(0) * l(1) - (l(0) + l(1) -1))

l = input().split()
print(l(0) * l(1) - (l(0) + l(1) -1))

l = map(int, raw_input().split())
print(l(0) * l(1) - (l(0) + l(1) - 1))

l = map(int, raw_input().split())
print(l(0) * l(1) - (l(0) + l(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: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

data = input()
a = int(data[0])
b = int(data[1])
print(a * b - a - b + 1)

data = input()
a = int(data[0])
b = int(data[1])
print(a * b - a - b + 1)

data = input()
a = int(data[0])
b = int(data[1])
print(a * b - a - b + 1)

data = input().split()
a = int(data[0])
b = int(data[1])
print(a * b - a - b + 1)

data = input().split()
a = int(data[0])
b = int(data[1])
print(a * b - a - b + 1)

data = input().split()
a = int(data[0])
b = int(data[1])
print(a * b - a - b + 1)

data = input().split()
a = int(data[0])
b = int(data[1])
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):
import sys
input = sys.stdin.readline
N, M, Q = map( int, input().split())
NN = [ [ 0 for _ in range(N+1)] for _ in range(N+1)]
for _ in range(M):
    L, R = map( int, input().split())
    NN[L][R] += 1
Sum = [ [ 0 ] for _ in range(N+1)]
for i in range(1,N+1):
    for j in range(1,N+1):
        Sum[i].append(Sum[i][-1]+NN[i][j])
for _ in range(Q):
    p, q = map(int, input().split())
    ans = 0
    for i in range(p,q+1):
        ans += Sum[i][q] - Sum[i][p-1]
    print(ans)

import sys
input = sys.stdin.readline
N, M, Q = map( int, input().split())
NN = [ [ 0 for _ in range(N+1)] for _ in range(N+1)]
for _ in range(M):
    L, R = map( int, input().split())
    NN[L][R] += 1
Sum = [ [ 0 ] for _ in range(N+1)]
for i in range(1,N+1):
    for j in range(1,N+1):
        Sum[i].append(Sum[i][-1]+NN[i][j])
for _ in range(Q):
    p, q = map(int, input().split())
    ans = 0
    for i in range(p,q+1):
        ans += Sum[i][q] - Sum[i][p-1]
    print(ans)

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

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

import sys
input = sys.stdin.readline
N, M, Q = map( int, input().split())
NN = [ [ 0 for _ in range(N+1)] for _ in range(N+1)]
for _ in range(M):
    L, R = map( int, input().split())
    NN[L][R] += 1
Sum = [ [ 0 ] for _ in range(N+1)]
for i in range(1,N+1):
    for j in range(1,N+1):
        Sum[i].append(Sum[i][-1]+NN[i][j])
for _ in range(Q):
    p, q = map(int, input().split())
    ans = 0
    for i in range(p,q+1):
        ans += Sum[i][q] - Sum[i][p-1]
    print(ans)

import sys
input = sys.stdin.readline
N, M, Q = map( int, input().split())
NN = [ [ 0 for _ in range(N+1)] for _ in range(N+1)]
for _ in range(M):
    L, R = map( int, input().split())
    NN[L][R] += 1
Sum = [ [ 0 ] for _ in range(N+1)]
for i in range(1,N+1):
    for j in range(1,N+1):
        Sum[i].append(Sum[i][-1]+NN[i][j])
for _ in range(Q):
    p, q = map(int, input().split())
    ans = 0
    for i in range(p,q+1):
        ans += Sum[i][q] - Sum[i][p-1]
    print(ans)

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

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(int((A-1)*(B-1)))

A = int(input())
B = int(input())
print(int((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(int((A-1)*(B-1)))

A = int(input())
B = int(input())
print(int((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

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 = input()
m = int(a[0])
n = int(a[1])

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

a = input()
m = int(a[0])
n = int(a[1])

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

a = input()
m = int(a[0])
n = int(a[1])

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

a = input()
m = int(a[0])
n = int(a[1])

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

a = input().split()
m = int(a[0])
n = int(a[1])
 
print(m*n - m - n +1)

a = input().split()
m = int(a[0])
n = int(a[1])
 
print(m*n - m - n +1)

a = input().split()
m = int(a[0])
n = int(a[1])
 
print(m*n - m - n +1)

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

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

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



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



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

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

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



N = int(input())
ans = 0
if N < 105:
  pass
else:
  for i in range(105, N+1, 2):
    cnt = 0
    for j in range(1, N+1):
      if i % j == 0:
        cnt += 1
    if cnt == 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: 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):
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())
count1 = 0

for i in range(1, n + 1, 2):
    count2 = 0

    for j in range(1, i + 1):
        if i % j == 0:
            count2 += 1

    if count2 == 8:
        count1 += 1

print(count1)

n = int(input())
count1 = 0

for i in range(1, n + 1, 2):
    count2 = 0

    for j in range(1, i + 1):
        if i % j == 0:
            count2 += 1

    if count2 == 8:
        count1 += 1

print(count1)

n = int(input())
count1 = 0

for i in range(1, n + 1, 2):
    count2 = 0

    for j in range(1, i + 1):
        if i % j == 0:
            count2 += 1

    if count2 == 8:
        count1 += 1

print(count1)

n = int(input())
count1 = 0

for i in range(1, n + 1, 2):
    count2 = 0

    for j in range(1, i + 1):
        if i % j == 0:
            count2 += 1

    if count2 == 8:
        count1 += 1

print(count1)

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

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

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

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

a,b = list(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):
import sys
n = int(input())


cn = 0

cy = 0

if n < 105:
    print(0)
    sys.exit()

for i in range(105, n+1):
    if i % 2 == 0:
        continue

    for j in range(1, i+1):
        if i % j == 0:
            cy += 1
    if cy == 8:
        cn += 1
    cy = 0
print(cn)


import sys
n = int(input())


cn = 0

cy = 0

if n < 105:
    print(0)
    sys.exit()

for i in range(105, n+1):
    if i % 2 == 0:
        continue

    for j in range(1, i+1):
        if i % j == 0:
            cy += 1
    if cy == 8:
        cn += 1
    cy = 0
print(cn)


import sys
n = int(input())


cn = 0

cy = 0

if n < 105:
    print(0)
    sys.exit()

for i in range(105, n+1):
    if i % 2 == 0:
        continue

    for j in range(1, i+1):
        if i % j == 0:
            cy += 1
    if cy == 8:
        cn += 1
    cy = 0
print(cn)


import sys
n = int(input())


cn = 0

cy = 0

if n < 105:
    print(0)
    sys.exit()

for i in range(105, n+1):
    if i % 2 == 0:
        continue

    for j in range(1, i+1):
        if i % j == 0:
            cy += 1
    if cy == 8:
        cn += 1
    cy = 0
print(cn)


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

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

print(c)


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

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

print(c)


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

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

print(c)


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

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

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

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

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

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

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

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

A,B = map(int,input().split())
print(A*B-(A*1+B*1)+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())
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))

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 -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):
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*B)

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

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*B)

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

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

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

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):
import numpy

l = raw_input().split()

c =((l[0] - 1) * (l[1] - 1))

print(c)

import numpy

l = raw_input().split()

c =((l[0] - 1) * (l[1] - 1))

print(c)

import numpy

l = raw_input().split()

c =((l[0] - 1) * (l[1] - 1))

print(c)

import numpy

l = raw_input().split()

c =((l[0] - 1) * (l[1] - 1))

print(c)

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+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 = 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))


L = list(map(int, input().split()))

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


L = list(map(int, input().split()))

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


L = list(map(int, input().split()))

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


L = list(map(int, input().split()))

print((L[0]-1)*(L[1]-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):
#106a
a,b=map(int,input().split())
pritn((a-1)*(b-1))

#106a
a,b=map(int,input().split())
pritn((a-1)*(b-1))

#106a
a,b=map(int,input().split())
pritn((a-1)*(b-1))

#106a
a,b=map(int,input().split())
pritn((a-1)*(b-1))

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

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

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

#106a
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*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))

listA=list(map(int,input().split()))

print(listA[0]*listA[1]-(listA[0]+listA[1]-1))

listA=list(map(int,input().split()))

print(listA[0]*listA[1]-(listA[0]+listA[1]-1))

listA=list(map(int,input().split()))

print(listA[0]*listA[1]-(listA[0]+listA[1]-1))

listA=list(map(int,input().split()))

print(listA[0]*listA[1]-(listA[0]+listA[1]-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):
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))

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

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

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

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

Wrong Answer

Wrong Answer

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

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

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

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

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

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

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

a,b=map(int, input().split())
c=(a-1)*(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):
a,b = map(int, input().split())
a = 1
b = 1
for i in range(100):
 a = a + i
 for j in range(100):
  b = b + j
  c = (a-1) * (b-1)
  print(c)

a,b = map(int, input().split())
a = 1
b = 1
for i in range(100):
 a = a + i
 for j in range(100):
  b = b + j
  c = (a-1) * (b-1)
  print(c)

a,b = map(int, input().split())
a == 1
b == 1
for i in range(100):
	a = a + i
    for j in range(100):
		b = b + j
		c = (a-1) * (b-1)

a,b = map(int, input().split())
a == 1
b == 1
for i in range(100):
	a = a + i
    for j in range(100):
		b = b + j
		c = (a-1) * (b-1)

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


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


a,b = map(int, input().split())
for 2 in range(100):
	c = (a-1) * (b-1)

a,b = map(int, input().split())
for 2 in range(100):
	c = (a-1) * (b-1)

a,b = map(int, input().split())
a = 1
b = 1
for i in range(100):
 a = a + i
 for j in range(100):
  b = b + j
  c = (a-1) * (b-1)
  print(c)

a,b = map(int, input().split())
a = 1
b = 1
for i in range(100):
 a = a + i
 for j in range(100):
  b = b + j
  c = (a-1) * (b-1)
  print(c)

a,b = map(int, input().split())
a == 1
b == 1
for i in range(100):
	a = a + i
    for j in range(100):
		b = b + j
		c = (a-1) * (b-1)

a,b = map(int, input().split())
a == 1
b == 1
for i in range(100):
	a = a + i
    for j in range(100):
		b = b + j
		c = (a-1) * (b-1)

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


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


a,b = map(int, input().split())
for 2 in range(100):
	c = (a-1) * (b-1)

a,b = map(int, input().split())
for 2 in range(100):
	c = (a-1) * (b-1)

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

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):
A,B=list(map(int,input.split()))
print((A-1)*(B-1) + )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

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

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

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

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

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

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

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

a,b=map(int,input().split())
print(int((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 numpy as np

def input_numbers():
    temp = list(map(int, input().split()))
    return temp

def GCD(a, b):
    if(a < b):
        temp = a
        a = b
        b = temp
    a = a % b
    if(a == 0):
        return b
    else:
        return GCD(a, b)

x = input_numbers()

print(x[0] * x[1])

import numpy as np

def input_numbers():
    temp = list(map(int, input().split()))
    return temp

def GCD(a, b):
    if(a < b):
        temp = a
        a = b
        b = temp
    a = a % b
    if(a == 0):
        return b
    else:
        return GCD(a, b)

x = input_numbers()

print(x[0] * x[1])

import numpy as np

def input_numbers():
    temp = list(map(int, input().split()))
    return temp

def GCD(a, b):
    if(a < b):
        temp = a
        a = b
        b = temp
    a = a % b
    if(a == 0):
        return b
    else:
        return GCD(a, b)

x = input_numbers()

print(x[0] * x[1])

import numpy as np

def input_numbers():
    temp = list(map(int, input().split()))
    return temp

def GCD(a, b):
    if(a < b):
        temp = a
        a = b
        b = temp
    a = a % b
    if(a == 0):
        return b
    else:
        return GCD(a, b)

x = input_numbers()

print(x[0] * x[1])

import numpy as np

def input_numbers():
    temp = list(map(int, input().split()))
    return temp

def GCD(a, b):
    if(a < b):
        temp = a
        a = b
        b = temp
    a = a % b
    if(a == 0):
        return b
    else:
        return GCD(a, b)

x = input_numbers()

ans = (x[0] - 1) * (x[1] - 1)

print(ans)

import numpy as np

def input_numbers():
    temp = list(map(int, input().split()))
    return temp

def GCD(a, b):
    if(a < b):
        temp = a
        a = b
        b = temp
    a = a % b
    if(a == 0):
        return b
    else:
        return GCD(a, b)

x = input_numbers()

ans = (x[0] - 1) * (x[1] - 1)

print(ans)

import numpy as np

def input_numbers():
    temp = list(map(int, input().split()))
    return temp

def GCD(a, b):
    if(a < b):
        temp = a
        a = b
        b = temp
    a = a % b
    if(a == 0):
        return b
    else:
        return GCD(a, b)

x = input_numbers()

ans = (x[0] - 1) * (x[1] - 1)

print(ans)

import numpy as np

def input_numbers():
    temp = list(map(int, input().split()))
    return temp

def GCD(a, b):
    if(a < b):
        temp = a
        a = b
        b = temp
    a = a % b
    if(a == 0):
        return b
    else:
        return GCD(a, b)

x = input_numbers()

ans = (x[0] - 1) * (x[1] - 1)

print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted