TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There are N candles placed on a number line. The i-th candle from the left is placed on coordinate x_i. Here, x_1 < x_2 < ... < x_N holds.  Initially, no candles are burning. Snuke decides to light K of the N candles.  Now, he is at coordinate 0. He can move left and right along the line with speed 1. He can also light a candle when he is at the same position as the candle, in negligible time.  Find the minimum time required to light K candles.

Submission attempts (in order):
n,k = (int(i) for i in input().split())
x = list(int(i) for i in input().split())
res = 0.0
for i in range(n-k):
    xl = x[i]
    xr = x[i+k]
    tmp = min(abs(xl)+abs(xr-xl), abs(xr)+abs(xr-xl))
    if type(res)==type(0.0):
        res = tmp
    else:
        res = min(res,tmp)
print(res)

n,k = (int(i) for i in input().split())
x = list(int(i) for i in input().split())
res = 1000000000
for i in range(n-k+1):
    xl = x[i]
    xr = x[i+k-1]
    tmp = min(abs(xl)+abs(xr-xl), abs(xr)+abs(xr-xl))
    res = min(res,tmp)
print(res)

Verdicts: Wrong Answer

Accepted
Problem: There are N candles placed on a number line. The i-th candle from the left is placed on coordinate x_i. Here, x_1 < x_2 < ... < x_N holds.  Initially, no candles are burning. Snuke decides to light K of the N candles.  Now, he is at coordinate 0. He can move left and right along the line with speed 1. He can also light a candle when he is at the same position as the candle, in negligible time.  Find the minimum time required to light K candles.

Submission attempts (in order):
    from bisect import bisect
    n,k=map(int,input().split())
    x=list(map(int,input().split()))
    g=bisect(x,0)
    if x[n-1]<=0 or x[0]>=0:
        print(max(abs(x[k-1]),abs(x[0])))
    else:
        if g>=k:
            s=g-k
        else:
            s=0
        t=0
        while s<=n-k:
            if x[s]<0 and x[s+k-1]>0:
                if t==0:
                    t=min(2*abs(x[s])+x[s+k-1],abs(x[s])+2*x[s+k-1])
                else:
                    t=min(t,2*abs(x[s])+x[s+k-1],abs(x[s])+2*x[s+k-1])
            else:
                t=min(t,max(abs(x[s]),abs(x[s+k-1])))
            s+=1
        print(t)

n,k=map(int,input().split())
x=list(map(int,input().split()))
dist=0
ans=10**9
for i in range(n-k+1):
    l=x[i]
    r=x[i+k-1]
    dist=r-l
    ans=min(ans,dist+min(abs(l),abs(r)))
print(ans)

Verdicts: Runtime Error

Accepted
Problem: There are N candles placed on a number line. The i-th candle from the left is placed on coordinate x_i. Here, x_1 < x_2 < ... < x_N holds.  Initially, no candles are burning. Snuke decides to light K of the N candles.  Now, he is at coordinate 0. He can move left and right along the line with speed 1. He can also light a candle when he is at the same position as the candle, in negligible time.  Find the minimum time required to light K candles.

Submission attempts (in order):
N,K = map(int,input().split())
X = list(map(int,input().split()))
x_n = [0] + sorted([-x for x in X if x < 0])
x_p = [0] + sorted([x for x in X if x >= 0])
size_n,size_p = len(x_n), len(x_p)
ans = 2 * 10**10
for i in range(K+1):
	if i < size_n and K-i < size_p:
		print(i, x_n[i], x_p[K-i])
		ans = min(ans, x_n[i] + x_p[K-i] + min(x_n[i], x_p[K-i]))
print(ans)

N,K = map(int,input().split())
X = list(map(int,input().split()))
x_n = sorted([-x for x in X if x < 0])
x_p = sorted([x for x in X if x >= 0])
size_n,size_p = len(x_n), len(x_p)
ans = 2 * 10**8
if size_n >= K:
	ans = min(ans, x_n[K-1])
if size_p >= K:
	ans = min(ans, x_p[K-1])
print(ans)
for i in range(1,K):
	if i <= size_n and K-i <= size_p:
		ans = min(ans, x_n[i-1] + x_p[K-i-1] + min(x_n[i-1], x_p[K-i-1]))
print(ans)

N,K = map(int,input().split())
X = list(map(int,input().split()))
x_n = [0] + sorted([-x for x in X if x < 0])
x_p = [0] + sorted([x for x in X if x >= 0])
size_n,size_p = len(x_n), len(x_p)
ans = 2 * 10**10
for i in range(K+1):
	if i < size_n and K-i < size_p:
		ans = min(ans, x_n[i] + x_p[K-i] + min(x_n[i], x_p[K-i]))
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are N candles placed on a number line. The i-th candle from the left is placed on coordinate x_i. Here, x_1 < x_2 < ... < x_N holds.  Initially, no candles are burning. Snuke decides to light K of the N candles.  Now, he is at coordinate 0. He can move left and right along the line with speed 1. He can also light a candle when he is at the same position as the candle, in negligible time.  Find the minimum time required to light K candles.

Submission attempts (in order):
N,K =(int(i) for i in input().split())
x = (int(i) for i in input().split())
i = 0
t_min = float("inf")
while i+K <= N :
  left = abs(x[i])+abs(x[i+K-1]-x[i])
  right = abs(x[i+K-1])+abs(x[i+K-1]-x[i])
  if min(left,right)<t_min:
    t_min = min(left,right)
  i += 1
print(t_min)

N,K =(int(i) for i in input().split())
x = list((int(i) for i in input().split()))
i = 0
t_min = float("inf")
while i+K-1 <= N-1 :
  left = abs(x[i])+abs(x[i+K-1]-x[i])
  right = abs(x[i+K-1])+abs(x[i+K-1]-x[i])
  if min(left,right)<t_min:
    t_min = min(left,right)
  i += 1
print(t_min)

Verdicts: Runtime Error

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(map(int, input().split()))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

print(a[0] * a[1] - (1 * 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):
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())
S = (A-1)*(B-1)
print(S)

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
import math
import collections
import sys

#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

a,b=MI()
ans=a*b-a-b
print(ans)

import math
import collections
import sys

#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

a,b=MI()
ans=a*b-a-b
print(ans)

import math
import collections
import sys

#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

a,b=MI()
ans=a*b-a-b
print(ans)

import math
import collections
import sys

#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

a,b=MI()
ans=a*b-a-b
print(ans)

import math
import collections
import sys
 
#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
 
a,b=MI()
ans=a*b-a-b+1
print(ans)

import math
import collections
import sys
 
#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
 
a,b=MI()
ans=a*b-a-b+1
print(ans)

import math
import collections
import sys
 
#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
 
a,b=MI()
ans=a*b-a-b+1
print(ans)

import math
import collections
import sys
 
#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
 
a,b=MI()
ans=a*b-a-b+1
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):
s = input()
k = int(input())

for i in map(int, s[:k]):
  if i != 1:
    print(i)
    break
else:
  print(1)


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

for i in map(int, s[:k]):
  if i != 1:
    print(i)
    break
else:
  print(1)


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

for i in map(int, s[:k]):
  if i != 1:
    print(i)
    break
else:
  print(1)


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

for i in map(int, s[:k]):
  if i != 1:
    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):
A B = map(int,input().split(' '))
print((A-1) * (B-1))

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

S = input()
K = int(input())
if all(S[x] == '1' for x in range(K)):
  print(1)
  exit()
else:
  for i in S:
    if i != '1':
      print(i)
      exit()

S = input()
K = int(input())
if all(S[x] == '1' for x in range(K)):
  print(1)
  exit()
else:
  for i in S:
    if i != '1':
      print(i)
      exit()

S = input()
K = int(input())
if all(S[x] == '1' for x in range(K)):
  print(1)
  exit()
else:
  for i in S:
    if i != '1':
      print(i)
      exit()

S = input()
K = int(input())
if all(S[x] == '1' for x in range(K)):
  print(1)
  exit()
else:
  for i in S:
    if i != '1':
      print(i)
      exit()

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

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

S = input()
K = int(input())
if all(S[x] == '1' for x in range(K)):
  print(1)
  exit()
else:
  for i in S:
    if i != '1':
      print(i)
      exit()

S = input()
K = int(input())
if all(S[x] == '1' for x in range(K)):
  print(1)
  exit()
else:
  for i in S:
    if i != '1':
      print(i)
      exit()

S = input()
K = int(input())
if all(S[x] == '1' for x in range(K)):
  print(1)
  exit()
else:
  for i in S:
    if i != '1':
      print(i)
      exit()

S = input()
K = int(input())
if all(S[x] == '1' for x in range(K)):
  print(1)
  exit()
else:
  for i in S:
    if i != '1':
      print(i)
      exit()

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 = 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):
x = int(input())
y = int(input())
print((x-1)*(y-1))

x = int(input())
y = int(input())
print((x-1)*(y-1))

x = int(input())
y = int(input())
print((x-1)*(y-1))

x = int(input())
y = int(input())
print((x-1)*(y-1))

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
S=input()
K=int(input())
for j in S:
	if j=='1':
		if j==K:
			co='1'
			break
	else:
		co=j
		break
print(co)

S=input()
K=int(input())
for j in S:
	if j=='1':
		if j==K:
			co='1'
			break
	else:
		co=j
		break
print(co)

S=input()
K=int(input())
for j in S:
	if j=='1':
		if j==K:
			co='1'
			break
	else:
		co=j
		break
print(co)

S=input()
K=int(input())
for j in S:
	if j=='1':
		if j==K:
			co='1'
			break
	else:
		co=j
		break
print(co)

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

a, b = 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*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):
#encoding utf-8

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

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


#encoding utf-8

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

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


#encoding utf-8

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

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


#encoding utf-8

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

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


#encoding utf-8

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

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


#encoding utf-8

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

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


#encoding utf-8

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

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


#encoding utf-8

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

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

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

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

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
s=input()
k=int(input())
if s.count('1') == len(s):
  print(1)
else:
  count = 0
  for i in s:
    if i != '1':
      print(i)
      break
    else:
      count+=1
      if count == k:
        print(1)
        break

s=input()
k=int(input())
if s.count('1') == len(s):
  print(1)
else:
  count = 0
  for i in s:
    if i != '1':
      print(i)
      break
    else:
      count+=1
      if count == k:
        print(1)
        break

s=input()
k=int(input())
if s.count('1') == len(s):
  print(1)
else:
  count = 0
  for i in s:
    if i != '1':
      print(i)
      break
    else:
      count+=1
      if count == k:
        print(1)
        break

s=input()
k=int(input())
if s.count('1') == len(s):
  print(1)
else:
  count = 0
  for i in s:
    if i != '1':
      print(i)
      break
    else:
      count+=1
      if count == k:
        print(1)
        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):
A,B=map(input().split())
print((A-1)*(B-1))

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
input_lines = raw_input().split()
a = int(input_lines[0])
b = int(input_lines[1])

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


input_lines = raw_input().split()
a = int(input_lines[0])
b = int(input_lines[1])

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


input_lines = raw_input().split()
a = int(input_lines[0])
b = int(input_lines[1])

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


input_lines = raw_input().split()
a = int(input_lines[0])
b = int(input_lines[1])

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


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

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


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

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


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

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


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

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

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

Submission attempts (in order):
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())
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())
print(a*b-a-b+1)

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

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

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

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

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

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 = 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,iput().split())
print((a-1)*(b-1))

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

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

a,b=map(int,iput().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())
c=(a-1)*(b-1)
c

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

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

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

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

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

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

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

Verdicts: 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):
# -*- coding: utf-8 -*-

def main():

    N = int(input())

    ans = 0

    for i in range(1, N+1):
        if i % 2 == 1:

            count = 0

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


if __name__ == "__main__":
    main()

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

def main():

    N = int(input())

    ans = 0

    for i in range(1, N+1):
        if i % 2 == 1:

            count = 0

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


if __name__ == "__main__":
    main()

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

def main():

    N = int(input())

    ans = 0

    for i in range(1, N+1):
        if i % 2 == 1:

            count = 0

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


if __name__ == "__main__":
    main()

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

def main():

    N = int(input())

    ans = 0

    for i in range(1, N+1):
        if i % 2 == 1:

            count = 0

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


if __name__ == "__main__":
    main()

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

def main():

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

    ans = (A-1) * (B-1)

    print(ans)


if __name__ == "__main__":
    main()

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

def main():

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

    ans = (A-1) * (B-1)

    print(ans)


if __name__ == "__main__":
    main()

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

def main():

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

    ans = (A-1) * (B-1)

    print(ans)


if __name__ == "__main__":
    main()

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

def main():

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

    ans = (A-1) * (B-1)

    print(ans)


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ans = (A - 1) * (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*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):
#!/usr/bin/env python3
import sys

def main():
    a = int(sys.stdin.readline().rstrip())
    b = int(sys.stdin.readline().rstrip())

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

if __name__ == '__main__':
    main()

#!/usr/bin/env python3
import sys

def main():
    a = int(sys.stdin.readline().rstrip())
    b = int(sys.stdin.readline().rstrip())

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

if __name__ == '__main__':
    main()

#!/usr/bin/env python3

def main():
    a = int(input().rstrip())
    b = int(input().rstrip())

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

if __name__ == '__main__':
    main()

#!/usr/bin/env python3

def main():
    a = int(input().rstrip())
    b = int(input().rstrip())

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

if __name__ == '__main__':
    main()

#!/usr/bin/env python3
import sys

def main():
    a = int(sys.stdin.readline().rstrip())
    b = int(sys.stdin.readline().rstrip())

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

if __name__ == '__main__':
    main()

#!/usr/bin/env python3
import sys

def main():
    a = int(sys.stdin.readline().rstrip())
    b = int(sys.stdin.readline().rstrip())

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

if __name__ == '__main__':
    main()

#!/usr/bin/env python3

def main():
    a = int(input().rstrip())
    b = int(input().rstrip())

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

if __name__ == '__main__':
    main()

#!/usr/bin/env python3

def main():
    a = int(input().rstrip())
    b = int(input().rstrip())

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

if __name__ == '__main__':
    main()

#!/usr/bin/env python3
import sys

def main():
    a, b = [int(x) for x in sys.stdin.readline().rstrip().split()]
    print((a-1)*(b-1))
    

if __name__ == '__main__':
    main()

#!/usr/bin/env python3
import sys

def main():
    a, b = [int(x) for x in sys.stdin.readline().rstrip().split()]
    print((a-1)*(b-1))
    

if __name__ == '__main__':
    main()

#!/usr/bin/env python3
import sys

def main():
    a, b = [int(x) for x in sys.stdin.readline().rstrip().split()]
    print((a-1)*(b-1))
    

if __name__ == '__main__':
    main()

#!/usr/bin/env python3
import sys

def main():
    a, b = [int(x) for x in sys.stdin.readline().rstrip().split()]
    print((a-1)*(b-1))
    

if __name__ == '__main__':
    main()

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())
S = 4*(((A-1)/2) *((B-1)/2))
print(int(S))

A = int(input())
B = int(input())
S = 4*(((A-1)/2) *((B-1)/2))
print(int(S))

A = int(input())
B = int(input())
S = 4*(((A-1)/2) *((B-1)/2))
print(int(S))

A = int(input())
B = int(input())
S = 4*(((A-1)/2) *((B-1)/2))
print(int(S))

l = input().split()
S = 4*(((int(l[0])-1)/2) *((int(l[1])-1)/2))
print(int(S))

l = input().split()
S = 4*(((int(l[0])-1)/2) *((int(l[1])-1)/2))
print(int(S))

l = input().split()
S = 4*(((int(l[0])-1)/2) *((int(l[1])-1)/2))
print(int(S))

l = input().split()
S = 4*(((int(l[0])-1)/2) *((int(l[1])-1)/2))
print(int(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*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-1)*(b-1))


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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):
r = int(input())
l = int(input())
print((r-1)*(l-1))

r = int(input())
l = int(input())
print((r-1)*(l-1))

r = int(input())
l = int(input())
print((r-1)*(l-1))

r = int(input())
l = int(input())
print((r-1)*(l-1))

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

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

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

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

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

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

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

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

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

inputs=input().split()
A=int(inputs[0])
B=int(inputs[1])
(A-1) * (B-1)

inputs=input().split()
A=int(inputs[0])
B=int(inputs[1])
(A-1) * (B-1)

inputs=input().split()
A=int(inputs[0])
B=int(inputs[1])
(A-1) * (B-1)

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

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

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

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

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted

Accepted

Accepted

Accepted