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):
s = input()
k = int(input())

for i in s:
    if i != '1':
        ans = int(i)
        break

print (i)


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

for i in s:
    if i != '1':
        ans = int(i)
        break

print (i)


n,m,q  = map(int,input().split())
rails=[tuple(map(int,input().split())) for i in range(m)]
qs=[tuple(map(int,input().split())) for i in range(q)]
enuq = list(enumerate(qs))
 
enuq.sort(key = lambda x:x[1][0])
ansli = [0 for i in range(q)]


for (i,(p,q)) in enuq:
    removelist=[]
    for (j,(l,r)) in enumerate(rails):
        if p<=l and r<=q:
            ansli[i]=ansli[i]+1
        elif l<p:
            removelist.append(j)
    for jj in removelist:
        rails.pop(jj)



for a in ansli:
    print(a)


n,m,q  = map(int,input().split())
rails=[tuple(map(int,input().split())) for i in range(m)]
qs=[tuple(map(int,input().split())) for i in range(q)]
enuq = list(enumerate(qs))
 
enuq.sort(key = lambda x:x[1][0])
ansli = [0 for i in range(q)]


for (i,(p,q)) in enuq:
    removelist=[]
    for (j,(l,r)) in enumerate(rails):
        if p<=l and r<=q:
            ansli[i]=ansli[i]+1
        elif l<p:
            removelist.append(j)
    for jj in removelist:
        rails.pop(jj)



for a in ansli:
    print(a)


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

for i in s:
    if i != '1':
        ans = int(i)
        break

print (i)


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

for i in s:
    if i != '1':
        ans = int(i)
        break

print (i)


n,m,q  = map(int,input().split())
rails=[tuple(map(int,input().split())) for i in range(m)]
qs=[tuple(map(int,input().split())) for i in range(q)]
enuq = list(enumerate(qs))
 
enuq.sort(key = lambda x:x[1][0])
ansli = [0 for i in range(q)]


for (i,(p,q)) in enuq:
    removelist=[]
    for (j,(l,r)) in enumerate(rails):
        if p<=l and r<=q:
            ansli[i]=ansli[i]+1
        elif l<p:
            removelist.append(j)
    for jj in removelist:
        rails.pop(jj)



for a in ansli:
    print(a)


n,m,q  = map(int,input().split())
rails=[tuple(map(int,input().split())) for i in range(m)]
qs=[tuple(map(int,input().split())) for i in range(q)]
enuq = list(enumerate(qs))
 
enuq.sort(key = lambda x:x[1][0])
ansli = [0 for i in range(q)]


for (i,(p,q)) in enuq:
    removelist=[]
    for (j,(l,r)) in enumerate(rails):
        if p<=l and r<=q:
            ansli[i]=ansli[i]+1
        elif l<p:
            removelist.append(j)
    for jj in removelist:
        rails.pop(jj)



for a in ansli:
    print(a)


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):
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)
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)
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)
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)
print("In this case, the area is", rem, "square yards.")

a = input()
b = a.split(" ")
b = [int(x) for x in b]

x = b[0]
y = b[1]

tA = x * y
rA = x + y - 1

ans = tA - rA
print(ans)

a = input()
b = a.split(" ")
b = [int(x) for x in b]

x = b[0]
y = b[1]

tA = x * y
rA = x + y - 1

ans = tA - rA
print(ans)

a = input()
b = a.split(" ")
b = [int(x) for x in b]

x = b[0]
y = b[1]

tA = x * y
rA = x + y - 1

ans = tA - rA
print(ans)

a = input()
b = a.split(" ")
b = [int(x) for x in b]

x = b[0]
y = b[1]

tA = x * y
rA = x + y - 1

ans = tA - rA
print(ans)

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)
else:
    print(1)

n = int(input())
if n < 105:
    print(0)
else:
    print(1)

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

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

n = int(input())
if n < 105:
    print(0)
else:
    print(1)

n = int(input())
if n < 105:
    print(0)
else:
    print(1)

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

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

i = input()
A = i.split(" ")[0]
B = i.split(" ")[1]
print((int(A)-1)*(int(B)-1))

i = input()
A = i.split(" ")[0]
B = i.split(" ")[1]
print((int(A)-1)*(int(B)-1))

i = input()
A = i.split(" ")[0]
B = i.split(" ")[1]
print((int(A)-1)*(int(B)-1))

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

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

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

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

s = list(map(int,input().split()))
print(s[0]*s[1] -(s[0]+s[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):
# -*- coding: utf-8 -*-
import sys

a = sys.args[0]
b = sys.args[1]

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


# -*- coding: utf-8 -*-
import sys

a = sys.args[0]
b = sys.args[1]

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


# -*- coding: utf-8 -*-
import sys

a = int(sys.argv[1])
b = int(sys.argv[2])

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


# -*- coding: utf-8 -*-
import sys

a = int(sys.argv[1])
b = int(sys.argv[2])

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


# -*- coding: utf-8 -*-
import sys

a = sys.args[0]
b = sys.args[1]

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


# -*- coding: utf-8 -*-
import sys

a = sys.args[0]
b = sys.args[1]

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


# -*- coding: utf-8 -*-
import sys

a = int(sys.argv[1])
b = int(sys.argv[2])

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


# -*- coding: utf-8 -*-
import sys

a = int(sys.argv[1])
b = int(sys.argv[2])

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


# -*- coding: utf-8 -*-

l = input().split()
a = int(l[0])
b = int(l[1])

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


# -*- coding: utf-8 -*-

l = input().split()
a = int(l[0])
b = int(l[1])

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


# -*- coding: utf-8 -*-

l = input().split()
a = int(l[0])
b = int(l[1])

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


# -*- coding: utf-8 -*-

l = input().split()
a = int(l[0])
b = int(l[1])

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


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

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

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

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

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

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

a, b = map(int, input().solit())
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):
# coding: utf-8

def solve(A, B):
    ans = A * B
    ans -= (A + B) - 1
    return ans

if __name__ == "__main__":

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


# coding: utf-8

def solve(A, B):
    ans = A * B
    ans -= (A + B) - 1
    return ans

if __name__ == "__main__":

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


# coding: utf-8

def solve(A, B):
    ans = A * B
    ans -= (A + B) - 1
    return ans

if __name__ == "__main__":

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


# coding: utf-8

def solve(A, B):
    ans = A * B
    ans -= (A + B) - 1
    return ans

if __name__ == "__main__":

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


# coding: utf-8

def solve(A, B):
    ans = A * B
    ans -= (A + B) - 1
    return ans

if __name__ == "__main__":

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


# coding: utf-8

def solve(A, B):
    ans = A * B
    ans -= (A + B) - 1
    return ans

if __name__ == "__main__":

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


# coding: utf-8

def solve(A, B):
    ans = A * B
    ans -= (A + B) - 1
    return ans

if __name__ == "__main__":

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


# coding: utf-8

def solve(A, B):
    ans = A * B
    ans -= (A + B) - 1
    return ans

if __name__ == "__main__":

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


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

a-=1
b-=1

print(a*b)

a,b=int(input())

a-=1
b-=1

print(a*b)

a,b = int(input())

a-=1
b-=1

print(a*b)

a,b = int(input())

a-=1
b-=1

print(a*b)

a,b=int(input())

a-=1
b-=1

print(a*b)

a,b=int(input())

a-=1
b-=1

print(a*b)

a,b = int(input())

a-=1
b-=1

print(a*b)

a,b = int(input())

a-=1
b-=1

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

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

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

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

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

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

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

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

a, b = map(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(eval("("+input().replace(" ", "-1)(")+"-1)"))

print(eval("("+input().replace(" ", "-1)(")+"-1)"))

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

count_1=0
while s!='':
  if s[0]=='1':
    count_1+=1
    s=s.lstrip('1')
  else:
    break
if count_1>=k:
  print('1')
else:
  print(s[0])


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

count_1=0
while s!='':
  if s[0]=='1':
    count_1+=1
    s=s.lstrip('1')
  else:
    break
if count_1>=k:
  print('1')
else:
  print(s[0])


print(eval("("+input().replace(" ", "-1)(")+"-1)"))

print(eval("("+input().replace(" ", "-1)(")+"-1)"))

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

count_1=0
while s!='':
  if s[0]=='1':
    count_1+=1
    s=s.lstrip('1')
  else:
    break
if count_1>=k:
  print('1')
else:
  print(s[0])


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

count_1=0
while s!='':
  if s[0]=='1':
    count_1+=1
    s=s.lstrip('1')
  else:
    break
if count_1>=k:
  print('1')
else:
  print(s[0])


print(eval("("+input().replace(" ", "-1)*(")+"-1)"))

print(eval("("+input().replace(" ", "-1)*(")+"-1)"))

print(eval("("+input().replace(" ", "-1)*(")+"-1)"))

print(eval("("+input().replace(" ", "-1)*(")+"-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,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

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(x) for x in input().split())
print((a-1) * (b-1))

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

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

a,b = (int(x) for x 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 = [int(x) for x in input().split()]

return a * b - a - b + 1

a, b = [int(x) for x in input().split()]

return a * b - a - b + 1

a, b = [int(x) for x in input().split()]

return a * b - a - b + 1

a, b = [int(x) for x in input().split()]

return a * b - a - b + 1

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

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

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

a, b = [int(x) for x in 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 = (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):
x,y = map(int,input().split)

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

x,y = map(int,input().split)

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

x,y = map(int,input().split)

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

x,y = map(int,input().split)

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

x,y = map(int,input().split())

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

x,y = map(int,input().split())

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

x,y = map(int,input().split())

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

x,y = map(int,input().split())

print(x*y - x - 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-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: 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 = input()
k = int(input())
for c in range(len(s)):
    if s[c] == "1":
        k -= 1
        if k >= 0:
            print(1)
            break
    else:
        print(s[c])
        break

s = input()
k = int(input())
for c in range(len(s)):
    if s[c] == "1":
        k -= 1
        if k >= 0:
            print(1)
            break
    else:
        print(s[c])
        break

s = input()
k = int(input())
for c in range(len(s)):
    if s[c] == "1":
        k -= 1
        if k >= 0:
            print(1)
            break
    else:
        print(s[c])
        break

s = input()
k = int(input())
for c in range(len(s)):
    if s[c] == "1":
        k -= 1
        if k >= 0:
            print(1)
            break
    else:
        print(s[c])
        break

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 numpy as np
AB = np.prod(np.array(list(map(int,input()))))
print(AB)

import numpy as np
AB = np.prod(np.array(list(map(int,input()))))
print(AB)

import numpy as np
AB = np.prod(np.array(list(map(int,input()))))
print(AB)

import numpy as np
AB = np.prod(np.array(list(map(int,input()))))
print(AB)

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

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

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

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

inp = input()
l = list(map(int, inp.split()))
a = l[0]
b = l[1]

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

inp = input()
l = list(map(int, inp.split()))
a = l[0]
b = l[1]

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

inp = input()
l = list(map(int, inp.split()))
a = l[0]
b = l[1]

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

inp = input()
l = list(map(int, inp.split()))
a = l[0]
b = l[1]

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

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: 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())
print(str(a*b-a-b+1))

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

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

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

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

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

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

a,b = map(int,input().split())
print(str(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-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*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())
def cnt(x):
	return sum(1 for i in range(1, x+1) if x%i == 0)
print(sum(1 for i in range(1, n+1, 2) if cnt(i) == 8))

n = int(input())
def cnt(x):
	return sum(1 for i in range(1, x+1) if x%i == 0)
print(sum(1 for i in range(1, n+1, 2) if cnt(i) == 8))

n = int(input())
def cnt(x):
	return sum(1 for i in range(1, x+1) if x%i == 0)
print(sum(1 for i in range(1, n+1, 2) if cnt(i) == 8))

n = int(input())
def cnt(x):
	return sum(1 for i in range(1, x+1) if x%i == 0)
print(sum(1 for i in range(1, n+1, 2) if cnt(i) == 8))

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

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

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

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

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

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

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

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

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

a = list(int(input().split()))
print((a[0]-1)*(a[1]-1))

a = list(int(input().split()))
print((a[0]-1)*(a[1]-1))

a = list(int(input().split()))
print((a[0]-1)*(a[1]-1))

a = list(input().split())
a = list(int(x) for x in a)
print((a[0]-1)*(a[1]-1))

a = list(input().split())
a = list(int(x) for x in a)
print((a[0]-1)*(a[1]-1))

a = list(input().split())
a = list(int(x) for x in a)
print((a[0]-1)*(a[1]-1))

a = list(input().split())
a = list(int(x) for x in a)
print((a[0]-1)*(a[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())
L = [int(i) for i in S]
count = 1
for i in L:
    if i != 1:
        if count <= K:
            print(i)
        else:
            print(1)
        exit()
    else:
        count += 1
print(1)

S = input()
K = int(input())
L = [int(i) for i in S]
count = 1
for i in L:
    if i != 1:
        if count <= K:
            print(i)
        else:
            print(1)
        exit()
    else:
        count += 1
print(1)

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

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

S = input()
K = int(input())
L = [int(i) for i in S]
count = 1
for i in L:
    if i != 1:
        if count <= K:
            print(i)
        else:
            print(1)
        exit()
    else:
        count += 1
print(1)

S = input()
K = int(input())
L = [int(i) for i in S]
count = 1
for i in L:
    if i != 1:
        if count <= K:
            print(i)
        else:
            print(1)
        exit()
    else:
        count += 1
print(1)

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

A,B = map(int,input().aplir())
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, b = [int(x) for x in input().split()]
print(a * b - a - b + 1)

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

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

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

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

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

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

a, b = [int(x) for x in 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):
li = list(map(int,input().split()))
n=li[0]
l=li[1]
print(n*l)

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

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

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

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

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

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

li = list(map(int,input().split()))
n=li[0]
l=li[1]
print((n-1)*(l-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())
count_ans = 0
for i in range(n//2 + 1):
  count_y = 0
  for j in range(2*i+2):
    if j > 0:
      if (2 * i + 1)%j == 0:
        count_y += 1
  if count_y == 8:
    count_ans += 1
print(count_ans)

n = int(input())
count_ans = 0
for i in range(n//2 + 1):
  count_y = 0
  for j in range(2*i+2):
    if j > 0:
      if (2 * i + 1)%j == 0:
        count_y += 1
  if count_y == 8:
    count_ans += 1
print(count_ans)

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

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

n = int(input())
count_ans = 0
for i in range(n//2 + 1):
  count_y = 0
  for j in range(2*i+2):
    if j > 0:
      if (2 * i + 1)%j == 0:
        count_y += 1
  if count_y == 8:
    count_ans += 1
print(count_ans)

n = int(input())
count_ans = 0
for i in range(n//2 + 1):
  count_y = 0
  for j in range(2*i+2):
    if j > 0:
      if (2 * i + 1)%j == 0:
        count_y += 1
  if count_y == 8:
    count_ans += 1
print(count_ans)

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

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

if __name__ == '__main__':
    main()


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

if __name__ == '__main__':
    main()


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

if __name__ == '__main__':
    main()


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

if __name__ == '__main__':
    main()


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

if __name__ == '__main__':
    main()


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

if __name__ == '__main__':
    main()


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

if __name__ == '__main__':
    main()


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

if __name__ == '__main__':
    main()


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 = input()
t = '1'

for i in range(len(s)) :
   if s[i]=='1' :
      continue
   else :
      t = s[i]
      break

print(t)

s = input()
k = input()
t = '1'

for i in range(len(s)) :
   if s[i]=='1' :
      continue
   else :
      t = s[i]
      break

print(t)

s = input()
k = input()
t = '1'

for i in range(len(s)) :
   if s[i]=='1' :
      continue
   else :
      t = s[i]
      break

print(t)

s = input()
k = input()
t = '1'

for i in range(len(s)) :
   if s[i]=='1' :
      continue
   else :
      t = s[i]
      break

print(t)

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())
lines = [i for i in range(24, n+1) if i % 2 != 0]

ans = 0
for i in lines:
    cnt = 0
    for j in range(1, i+1):
        if i % j == 0:
            cnt += 1
        if cnt == 8:
            ans += 1
print(ans)


n = int(input())
lines = [i for i in range(24, n+1) if i % 2 != 0]

ans = 0
for i in lines:
    cnt = 0
    for j in range(1, i+1):
        if i % j == 0:
            cnt += 1
        if cnt == 8:
            ans += 1
print(ans)


n = int(input())

ans = 0
for i in range(1, n+1):
    cnt = 0
    for j in range(1, i+1):
        if i % 2 != 0 and i % j == 0:
            cnt += 1
            if cnt == 8:
                ans += 1
print(ans)

n = int(input())

ans = 0
for i in range(1, n+1):
    cnt = 0
    for j in range(1, i+1):
        if i % 2 != 0 and i % j == 0:
            cnt += 1
            if cnt == 8:
                ans += 1
print(ans)

n = int(input())
lines = [i for i in range(24, n+1) if i % 2 != 0]

ans = 0
for i in lines:
    cnt = 0
    for j in range(1, i+1):
        if i % j == 0:
            cnt += 1
        if cnt == 8:
            ans += 1
print(ans)


n = int(input())
lines = [i for i in range(24, n+1) if i % 2 != 0]

ans = 0
for i in lines:
    cnt = 0
    for j in range(1, i+1):
        if i % j == 0:
            cnt += 1
        if cnt == 8:
            ans += 1
print(ans)


n = int(input())

ans = 0
for i in range(1, n+1):
    cnt = 0
    for j in range(1, i+1):
        if i % 2 != 0 and i % j == 0:
            cnt += 1
            if cnt == 8:
                ans += 1
print(ans)

n = int(input())

ans = 0
for i in range(1, n+1):
    cnt = 0
    for j in range(1, i+1):
        if i % 2 != 0 and 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: 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):
nums = [int(i) for i in input().split()] 

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

nums = [int(i) for i in input().split()] 

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

nums = [int(i) for i in input().split()] 

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

nums = [int(i) for i in input().split()] 

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

nums = [(int(i) - 1) for i in input().split()] 

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

nums = [(int(i) - 1) for i in input().split()] 

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

nums = [(int(i) - 1) for i in input().split()] 

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

nums = [(int(i) - 1) for i in input().split()] 

print(nums[0] * nums[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(e) for e in input().split)

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

a, b = map(int(e) for e in input().split)

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

a, b = map(int(e) for e in input().split)

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

a, b = map(int(e) for e in 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())
res = (A-1)*(B-1)

print(int(res))


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

print(int(res))


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

print(int(res))


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

print(int(res))


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

print(int(res))


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

print(int(res))


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

print(int(res))


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

print(int(res))


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

#!/usr/bin/env python3

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


if __name__ == "__main__":
    main()


#!/usr/bin/env python3

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


if __name__ == "__main__":
    main()


#!/usr/bin/env python3

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


if __name__ == "__main__":
    main()


#!/usr/bin/env python3

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


if __name__ == "__main__":
    main()


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted