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

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

train = []
quest = []
for i in range(setting[1]):
    num = list(map(int, input().split()))
    train.append(num)
train = np.array(train)

for i in range(setting[2]):
    q = list(map(int, input().split()))
    quest.append(q)

train = train * np.array([1,-1])
for qs in quest:
    a = train
    sch = np.array(qs)
    sch = sch * np.array([-1,1])
    b = a + sch
    ans = np.delete(b, np.where(b<0), axis=0)

    print(ans.shape[0])


import numpy as np

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

train = []
quest = []
for i in range(setting[1]):
    num = list(map(int, input().split()))
    train.append(num)
train = np.array(train)

for i in range(setting[2]):
    q = list(map(int, input().split()))
    quest.append(q)

train = train * np.array([1,-1])
for qs in quest:
    a = train
    sch = np.array(qs)
    sch = sch * np.array([-1,1])
    b = a + sch
    ans = np.delete(b, np.where(b<0), axis=0)

    print(ans.shape[0])


import numpy as np

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

train = []
quest = []
for i in range(setting[1]):
    num = list(map(int, input().split()))
    train.append(num)
train = np.array(train)

for i in range(setting[2]):
    q = list(map(int, input().split()))
    quest.append(q)

train = train * np.array([1,-1])
for qs in quest:
    a = train
    sch = np.array(qs)
    sch = sch * np.array([-1,1])
    b = a + sch
    ans = np.delete(b, np.where(b<0), axis=0)

    print(ans.shape[0])


import numpy as np

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

train = []
quest = []
for i in range(setting[1]):
    num = list(map(int, input().split()))
    train.append(num)
train = np.array(train)

for i in range(setting[2]):
    q = list(map(int, input().split()))
    quest.append(q)

train = train * np.array([1,-1])
for qs in quest:
    a = train
    sch = np.array(qs)
    sch = sch * np.array([-1,1])
    b = a + sch
    ans = np.delete(b, np.where(b<0), axis=0)

    print(ans.shape[0])


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

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

print(s)


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

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

print(s)


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

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

print(s)


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

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

print(s)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: There is a farm whose length and width are A yard and B yard, respectively. A farmer, John, made a vertical road and a horizontal road inside the farm from one border to another, as shown below: (The gray part represents the roads.)    What is the area of this yard excluding the roads? Find it.

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: There is a farm whose length and width are A yard and B yard, respectively. A farmer, John, made a vertical road and a horizontal road inside the farm from one border to another, as shown below: (The gray part represents the roads.)    What is the area of this yard excluding the roads? Find it.

Submission attempts (in order):
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))


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

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):
def menseki(a, b):
    return a * b - (1 * b + 1 * a - 1)

if __name__ == '__main__':
    la = int(input())
    lb = int(input())

    print(menseki(la, lb))


def menseki(a, b):
    return a * b - (1 * b + 1 * a - 1)

if __name__ == '__main__':
    la = int(input())
    lb = int(input())

    print(menseki(la, lb))


def menseki(a, b):
    return a * b - (1 * b + 1 * a - 1)

if __name__ == '__main__':
    la = int(input())
    lb = int(input())

    print(menseki(la, lb))


def menseki(a, b):
    return a * b - (1 * b + 1 * a - 1)

if __name__ == '__main__':
    la = int(input())
    lb = int(input())

    print(menseki(la, lb))


def menseki(a, b):
    return a * b - (1 * b + 1 * a - 1)

if __name__ == '__main__':
    la, lb = map(int, input().split())
    print(menseki(la, lb))


def menseki(a, b):
    return a * b - (1 * b + 1 * a - 1)

if __name__ == '__main__':
    la, lb = map(int, input().split())
    print(menseki(la, lb))


def menseki(a, b):
    return a * b - (1 * b + 1 * a - 1)

if __name__ == '__main__':
    la, lb = map(int, input().split())
    print(menseki(la, lb))


def menseki(a, b):
    return a * b - (1 * b + 1 * a - 1)

if __name__ == '__main__':
    la, lb = map(int, input().split())
    print(menseki(la, lb))


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

total = a * b - (a + b - 1)

print(total)


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

total = a * b - (a + b - 1)

print(total)


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

total = a * b - (a + b - 1)

print(total)


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

total = a * b - (a + b - 1)

print(total)


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

total = a * b - (a + b - 1)

print(total)


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

total = a * b - (a + b - 1)

print(total)


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

total = a * b - (a + b - 1)

print(total)


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

total = a * b - (a + b - 1)

print(total)


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):
input_H1 = input()
input_H2 = input()

H1 = int(input_H1)
H2 = int(input_H2)

print((H1-1)*(H2-1))


input_H1 = input()
input_H2 = input()

H1 = int(input_H1)
H2 = int(input_H2)

print((H1-1)*(H2-1))


input_A = input()
input_B = input()

A = int(input_A)
B = int(input_B)

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


input_A = input()
input_B = input()

A = int(input_A)
B = int(input_B)

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


input_H1 = input()
input_H2 = input()

H1 = int(input_H1)
H2 = int(input_H2)

print((H1-1)*(H2-1))


input_H1 = input()
input_H2 = input()

H1 = int(input_H1)
H2 = int(input_H2)

print((H1-1)*(H2-1))


input_A = input()
input_B = input()

A = int(input_A)
B = int(input_B)

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


input_A = input()
input_B = input()

A = int(input_A)
B = int(input_B)

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

a=raw_input().split();print((int(a[0])-1)*(int(a[1])-1));

return (A-1)*(B-1);

return (A-1)*(B-1);

import math
a=input().split("¥n")
K=int(a[1])
S_len=len(a[0])

print("K="+str(K) +" S_len="+str(S_len))

for i in range(S_len):
    # print("i="+str(i) +" n="+a[0][i])
    n=int(a[0][i])
    # print("i="+str(i) +" n="+str(n))

    # if(n==1):
    #     K-=1
    
    #         print("1")
    #         break
    # else:

    L=int(K*math.log10(n))
    
    K-=L+1
    if(K<=0):
        print(n)
        break


import math
a=input().split("¥n")
K=int(a[1])
S_len=len(a[0])

print("K="+str(K) +" S_len="+str(S_len))

for i in range(S_len):
    # print("i="+str(i) +" n="+a[0][i])
    n=int(a[0][i])
    # print("i="+str(i) +" n="+str(n))

    # if(n==1):
    #     K-=1
    
    #         print("1")
    #         break
    # else:

    L=int(K*math.log10(n))
    
    K-=L+1
    if(K<=0):
        print(n)
        break


a = raw_input().split();
print((int(a[0])-1)*(int(a[1])-1));


a = raw_input().split();
print((int(a[0])-1)*(int(a[1])-1));


a=raw_input().split();print((int(a[0])-1)*(int(a[1])-1));

a=raw_input().split();print((int(a[0])-1)*(int(a[1])-1));

return (A-1)*(B-1);

return (A-1)*(B-1);

import math
a=input().split("¥n")
K=int(a[1])
S_len=len(a[0])

print("K="+str(K) +" S_len="+str(S_len))

for i in range(S_len):
    # print("i="+str(i) +" n="+a[0][i])
    n=int(a[0][i])
    # print("i="+str(i) +" n="+str(n))

    # if(n==1):
    #     K-=1
    
    #         print("1")
    #         break
    # else:

    L=int(K*math.log10(n))
    
    K-=L+1
    if(K<=0):
        print(n)
        break


import math
a=input().split("¥n")
K=int(a[1])
S_len=len(a[0])

print("K="+str(K) +" S_len="+str(S_len))

for i in range(S_len):
    # print("i="+str(i) +" n="+a[0][i])
    n=int(a[0][i])
    # print("i="+str(i) +" n="+str(n))

    # if(n==1):
    #     K-=1
    
    #         print("1")
    #         break
    # else:

    L=int(K*math.log10(n))
    
    K-=L+1
    if(K<=0):
        print(n)
        break


a = raw_input().split();
print((int(a[0])-1)*(int(a[1])-1));


a = raw_input().split();
print((int(a[0])-1)*(int(a[1])-1));


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

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

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

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

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()
n = int(input())
 
count = 0
for i in s:
    count+=1
    if i != "1" or count == n:
        print(i)
        break
else:
    print(1)

s = input()
n = int(input())
 
count = 0
for i in s:
    count+=1
    if i != "1" or count == n:
        print(i)
        break
else:
    print(1)

s = input()
n = int(input())
 
count = 0
for i in s:
    count+=1
    if i != "1" or count == n:
        print(i)
        break
else:
    print(1)

s = input()
n = int(input())
 
count = 0
for i in s:
    count+=1
    if i != "1" or count == n:
        print(i)
        break
else:
    print(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):
def abc106_a():
    a, b = map(int, input().split())
    b = int(input())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a, b = map(int, input().split())
    b = int(input())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a = int(input())
    b = int(input())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a = int(input())
    b = int(input())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a, b = map(int, input().split())
    b = int(input())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a, b = map(int, input().split())
    b = int(input())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a = int(input())
    b = int(input())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a = int(input())
    b = int(input())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a, b = map(int, input().split())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a, b = map(int, input().split())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a, b = map(int, input().split())

    return a * b - a - b + 1


print(abc106_a())

def abc106_a():
    a, b = map(int, input().split())

    return a * b - a - b + 1


print(abc106_a())

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

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

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

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

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted

Accepted

Accepted

Accepted
Problem: There is a farm whose length and width are A yard and B yard, respectively. A farmer, John, made a vertical road and a horizontal road inside the farm from one border to another, as shown below: (The gray part represents the roads.)    What is the area of this yard excluding the roads? Find it.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

if len(S) == 1:
        print(S[0])
        exit(0)

i = 0
while S[i] == '1':
        i += 1
print(S[i])

S = str(input())
K = int(input())

if len(S) == 1:
        print(S[0])
        exit(0)

i = 0
while S[i] == '1':
        i += 1
print(S[i])

S = str(input())
K = int(input())

if len(S) == 1:
        print(S[0])
        exit(0)

i = 0
while S[i] == '1':
        i += 1
print(S[i])

S = str(input())
K = int(input())

if len(S) == 1:
        print(S[0])
        exit(0)

i = 0
while S[i] == '1':
        i += 1
print(S[i])

A = sorted(list(map(int, input().split())))

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

A = sorted(list(map(int, input().split())))

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

A = sorted(list(map(int, input().split())))

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

A = sorted(list(map(int, input().split())))

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):
n,m,q=map(int,input().split())
alist=[]
for i in range(m):
    l,r=map(int,input().split())
    alist.append([l,r])
alist.sort()
for t in range(q):
    count=0
    blist=[]
    p,q=map(int,input().split())
    for j in range (len(alist)):
        if p<=alist[0][0]:
            alist.sort(key=lambda x:x[1])
            break
        blist.append(alist[0])
        alist.remove(alist[0])
    for j in range (len(alist)):
        if q>=alist[j][1]:
            count+=1
        else:
            break
    for k in blist:
        alist.append(k)
    print(count)
    alist.sort(key=lambda x:x[0])

n,m,q=map(int,input().split())
alist=[]
for i in range(m):
    l,r=map(int,input().split())
    alist.append([l,r])
alist.sort()
for t in range(q):
    count=0
    blist=[]
    p,q=map(int,input().split())
    for j in range (len(alist)):
        if p<=alist[0][0]:
            alist.sort(key=lambda x:x[1])
            break
        blist.append(alist[0])
        alist.remove(alist[0])
    for j in range (len(alist)):
        if q>=alist[j][1]:
            count+=1
        else:
            break
    for k in blist:
        alist.append(k)
    print(count)
    alist.sort(key=lambda x:x[0])

n,m,q=map(int,input().split())
alist=[]
for i in range(m):
    l,r=map(int,input().split())
    alist.append([l,r])
alist.sort()
for t in range(q):
    count=0
    blist=[]
    p,q=map(int,input().split())
    for j in range (len(alist)):
        if p<=alist[0][0]:
            alist.sort(key=lambda x:x[1])
            break
        blist.append(alist[0])
        alist.remove(alist[0])
    for j in range (len(alist)):
        if q>=alist[j][1]:
            count+=1
        else:
            break
    for k in blist:
        alist.append(k)
    print(count)
    alist.sort(key=lambda x:x[0])

n,m,q=map(int,input().split())
alist=[]
for i in range(m):
    l,r=map(int,input().split())
    alist.append([l,r])
alist.sort()
for t in range(q):
    count=0
    blist=[]
    p,q=map(int,input().split())
    for j in range (len(alist)):
        if p<=alist[0][0]:
            alist.sort(key=lambda x:x[1])
            break
        blist.append(alist[0])
        alist.remove(alist[0])
    for j in range (len(alist)):
        if q>=alist[j][1]:
            count+=1
        else:
            break
    for k in blist:
        alist.append(k)
    print(count)
    alist.sort(key=lambda x:x[0])

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

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: 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(i) for i in input().split())
print(A*B-A-B)

A,B=(int(i) for i in input().split())
print(A*B-A-B)

A,B=(int(i) for i in input().split())
print(A*B-A-B)

A,B=(int(i) for i in input().split())
print(A*B-A-B)

A,B=(int(i) for i in input().split())
print(A*B-A-B+1)

A,B=(int(i) for i in input().split())
print(A*B-A-B+1)

A,B=(int(i) for i in input().split())
print(A*B-A-B+1)

A,B=(int(i) for i in 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-B-A-1)

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

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

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


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


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


A, B = 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))


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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: There is a farm whose length and width are A yard and B yard, respectively. A farmer, John, made a vertical road and a horizontal road inside the farm from one border to another, as shown below: (The gray part represents the roads.)    What is the area of this yard excluding the roads? Find it.

Submission attempts (in order):
print((input().replace("1","")+"1")[0])

print((input().replace("1","")+"1")[0])

print((input().replace("1","")+"1")[0])

print((input().replace("1","")+"1")[0])

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: There is a farm whose length and width are A yard and B yard, respectively. A farmer, John, made a vertical road and a horizontal road inside the farm from one border to another, as shown below: (The gray part represents the roads.)    What is the area of this yard excluding the roads? Find it.

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: There is a farm whose length and width are A yard and B yard, respectively. A farmer, John, made a vertical road and a horizontal road inside the farm from one border to another, as shown below: (The gray part represents the roads.)    What is the area of this yard excluding the roads? Find it.

Submission attempts (in order):
a, b = 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())
count = 0
answer = 0
for x in range(1,N+1,2):
    for i in range(1,x+1):
        if x % i == 0:
            count += 1
    if count == 8:
        answer +=1
    count = 0
print (answer)

N = int(input())
count = 0
answer = 0
for x in range(1,N+1,2):
    for i in range(1,x+1):
        if x % i == 0:
            count += 1
    if count == 8:
        answer +=1
    count = 0
print (answer)

N = int(input())
count = 0
answer = 0
for x in range(1,N+1,2):
    for i in range(1,x+1):
        if x % i == 0:
            count += 1
    if count == 8:
        answer +=1
    count = 0
print (answer)

N = int(input())
count = 0
answer = 0
for x in range(1,N+1,2):
    for i in range(1,x+1):
        if x % i == 0:
            count += 1
    if count == 8:
        answer +=1
    count = 0
print (answer)

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted
Problem: There is a farm whose length and width are A yard and B yard, respectively. A farmer, John, made a vertical road and a horizontal road inside the farm from one border to another, as shown below: (The gray part represents the roads.)    What is the area of this yard excluding the roads? Find it.

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

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

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

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

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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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



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

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


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):
n=int(input())
if n<105:print(0)
elif n<3*5*9:print(1)
elif n<3*5*11:print(2)
else:print(3)

n=int(input())
if n<105:print(0)
elif n<3*5*9:print(1)
elif n<3*5*11:print(2)
else:print(3)

n=int(input())
if n<105:print(0)
elif n<3*5*9:print(1)
elif n<3*5*11:print(2)
else:print(3)

n=int(input())
if n<105:print(0)
elif n<3*5*9:print(1)
elif n<3*5*11:print(2)
else:print(3)

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

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=raw_input().split()
 
print((l[0]-1)-(l[1]-1)+1)

l=raw_input().split()
 
print((l[0]-1)-(l[1]-1)+1)

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

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

l=raw_input().split()
 
print((l[0]-1)-(l[1]-1))

l=raw_input().split()
 
print((l[0]-1)-(l[1]-1))

l=raw_input().split()
 
print((l[0]-1)-(l[1]-1)+1)

l=raw_input().split()
 
print((l[0]-1)-(l[1]-1)+1)

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

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

l=raw_input().split()
 
print((l[0]-1)-(l[1]-1))

l=raw_input().split()
 
print((l[0]-1)-(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

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