TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A,B=int(input().split())
if 1<=A<=9 and 1<=B<=9:
    print(A*B)
else:
    print(-1)

a,b=map(int,input().split())
if 1<=a<=9 and 1<=b<=9:
  print(a*b)
else:
  print(-1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

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


# A - 9x9
a,b = map(int, input().split())
if a<10 and b<10:
    print(a*b)
else:
    print(-1)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a = 0
N = int(input())
for i in range(1, 10):
  for j in range(1, 10):
    if N == i*j:
      print('Yes')
      a = 1
  if a == 1:
    break
if a == 0:
  print('No')

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

if 1<=A<=9 and 1<=B<=9:
  	print (A*B)
else:
  	print('-1')

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
def func():
    a = int(input())
    for i in range(1, 10):
        for n in range(1, 10):
            if a == i * n:
                print("Yes")
                return
    print("No")
 
 
func()

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

if (a < 10 and a > 0) and (b < 10 and b > 0):
    print(a * b)
else:
    print(-1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
n = int(input())
min = n+1
kaisu = int((n/4)-1)

for i in range(kaisu):
    if n%(i+1)==0:
        tmp = i+(n/(i+1))-1
        if min > tmp:
            min = tmp
    if (i+1)**2>n:
        break

print(int(min))

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

if a>9 or b>9:
    print("-1")
else:
    print(a * b)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a1=input()
a2=[i for i in a1.split()]
x,y=float(a2[0]),float(a2[1])
v,v1=x.is_integer(),y.is_integer()
if 1<=(x and y)<=20 and v1==v2==True:
    if 1<=(x and y)<=9:
        print(int(x*y))
    else:
        print('-1')

a1=input()
a2=[i for i in a1.split()]
x,y=float(a2[0]),float(a2[1])
v,v1=x.is_integer(),y.is_integer()
if 1<=x<=20 and 1<=y<=20 and v==v1==True:
    if 1<=x<=9 and 1<=y<=9:
        print(int(x*y))
    else:
        print('-1')

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if 1<=a<=9 and 1<=b<=9:
  return a*b
else:
  return -1

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

if 1<=a<=9 and 1<=b<=9:
  print(a*b)
else:
  print(-1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if a<10 and b<10:
	print(a*b)
else::
	print("-1")

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

if a<10 and b<10:
	print(a*b)
else:
	print("-1")

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
s = input().split() 

def sort(A):
    if len(A) < 2:
        return A
    c = len(A)//2
    return merge(sort(A[:c]), sort(A[c:]))

def merge(X, Y):
    if len(X) < 1:
        return Y
    if len(Y) < 1:
        return X
    if (X[0] > Y[0]):
        return [Y[0]]+ merge(X, Y[1:])
    else:
        return [X[0]] + merge(X[1:], Y)

n = int(s[0])
divisors = []
for i in range(1, int(n**0.5)+1):
    if n % i == 0:
        divisors.append(i)
        if i != n // i:
            divisors.append(n//i)

divisors = sort(divisors)
l = len(divisors)
n1 = divisors[l // 2 - 1]
n2 = divisors[l // 2]
ans = n1 + n2 - 2
print(n2)

s = input().split() 

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

n = int(s[0])
newdivisors = make_divisors(n)
l = len(newdivisors)
n1 = newdivisors[l // 2 - 1]
n2 = newdivisors[l // 2]
ans = n1 + n2 - 2
print(ans)


s = input().split() 


if  0 < int(s[0]) < 10 and 0 < int(s[1]) < 10:
    i = int(s[0]) * int(s[1])   
    print(i)
else:
    print(-1)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a,b=map(int,input().split())
if 1<=a<=9 AND 1<=b<=9:
  print(a*b)
else:
  print("-1")


a,b=map(int,input().split())
if (a >=1) AND (a <= 20) AND (b >=1) AND (b =< 20):
  print(a*b)
else:
  print("-1")

a,b=map(int,input().split())
if (1 =< a <= 20) AND (1 =< b <= 20)
  print(a*b)
  else:
    print("-1")

a,b=map(int,input().split())
if 1=<a<=20 AND 1=<b<=20:
  print(a*b)
else:
  print("-1")


a,b=map(int,input().split())
if 1=<a<=9 AND 1=<b<=9:
  print(a*b)
else:
  print("-1")


A,B=map(int,input().split())
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print("-1")


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a,b = map(int, input().split())
print("a:{},b:{}".format(a,b))
if a<10 and b<10:
  print(a*b)
else:
  print(-1)

a,b = map(int, input().split())
print("a:{},b:{}".format(a,b))
if a<10 and a>0 and b<10 and b>0:
  print(a*b)
else:
  print(-1)

a,b = map(int, input().split())
if a<=9 and a>=1 and b<=9 and b>=1:
  print(a*b)
else:
  print(-1)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if a < 1 or a > 9:
    return -1

if b < 1 or b > 9;
    return -1

return a * b

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

if a < 1 or a > 9:
    return -1

if b < 1 or b > 9:
    return -1

return a * b


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

if a < 1 or a > 9:
    print(-1)
elif b < 1 or b > 9:
    print(-1)
else:
    print(a * b)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if a>9 and b>9:
  print(-1)
  else
  print(a*b)
  
  

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

if a>9 or b>9:
  print("-1")
else:
  print(a*b)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
N=int(input())
ans="No"
for i in range(1,10):
    for j in range(1,10):
        if i*j==N:
            ans="Yes"
print(ans)


a,b=map(int,input().split())
ans=-1
if a>0 and a<10 and b>0 and b<10:
    ans=a*b
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

a,b=map(int,input().split())
print(a*b if 1<=a<=9 and 1<=b<=9 else -1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

print(a*b if 1<=a<=9 and 1<=b<=9 else -1)

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

print('Yes' if 1<=a<=9 and 1<=b<=9 else 'No')

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

print(a*b if 1<=a<=9 and 1<=b<=9 else -1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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


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

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

    a,b=map(int,input().split())
    if a<9 and b<9:
      print(a*b)
    else:
		print(-1)
      

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

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

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

    a,b=map(int,input().split())
    if a<9 and b<9:
      print(a*b)
    else:
      print(-1)

    a,b=map(int,input().split())
    if a>9  | b>9:
      print(-1)
    else:
      print(a*b)
      

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

    a,b=map(int,input().split())
    if a>9  || b>9:
      print(-1)
    else:
      print(a*b)
      

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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
N=int(input())
flag=0
for i in range(9):
    for j in range(9):
        if (i+1)*(j+1)==N:
            flag=1

if flag==1:
    print('Yes')
else:
    print('No')


a = list(map(int,input().split()))
A=a[0]
B=a[1]

if 1<=A<=9 and 1<=B<=9:
    print(A*B)
else:
    print(-1)


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if A > 9 or B > 9:
	print(-1)
else:
	print(A*B)

A = int(input())
B= int(input())
if A > 9 or B > 9:
	print(-1)
else
	print(A*B)

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

if A > 9 or B > 9:
	print(-1)
else:
	print(A*B)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A,B=map(int,input().split())
if len(A)==1 and len(B)==1:
  print(A*B)
else:
  print("-1")

A,B=map(str,input().split())
if len(A)==1 and len(B)==1:
    print(int(A)*int(B))
else:
    print("-1")

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if A // 10 == 0 or B // 10 == 0:
  print(-1)
else:
  print(A * B)

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

if A // 10 != 0 or B // 10 != 0:
  print(-1)
else:
  print(A * B)


Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
n = int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    
    return divisors
  
ans = n
yakusuu = make_divisors(n)
for i in range(0 ,len(yakusuu), 2):
    kari = yakusuu[i] -1 + yakusuu[i+1]-1
    if (ans > kari):
        ans = kari
print(ans)

import math
n = int(input())

for i in range(int(math.sqrt(n)), 0, -1):
    if n % i == 0:
        num = i
        break
        
ans = int(num -1 + (n / num) -1)
print(ans)

ab = list(map(int, input().split()))
if ab[0] < 10 and ab[1] < 10:
    print(ab[0] * ab[1])
else:
    print(-1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
i = list(map(int, input().split()))
if 1 <= i[0] <= 9 and 1 <= i[1] <= 9:
  return i[0] * i[1]
else:
  return -1


i = list(map(int, input().split()))
if 0 <= i[0] and i[0] <= 9 and 0 <= i[1] and i[1] <= 9:
  return i[0] * i[1]
else:
  return -1


i = list(map(int, input().split()))
if 0 <= i[0] <= 9 and 0 <= i[1] <= 9:
  return i[0] * i[1]
else:
  return -1


i = list(map(int, input().split()))
if 1 <= i[0] <= 9 and 1 <= i[1] <= 9:
  print(i[0] * i[1])
else:
  print(-1)



Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a,b = int(input())
print(a*b if a < 10 and b < 10 else -1)

a,b = map(int,input().split())
print(a*b if a < 10 and b < 10 else -1)


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A,B = map(int,input().split())
if A<=9 && B<=9:
  print(A*B)
else:
  print(-1)


A = int(input())
B = int(input())
if A<=9 && B<=9:
  print(A*B)
else:
  print(-1)

A,B = map(int,input().split())
if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if a <= 10 and b <= 10:
    print('-1')
else:
    answer = a * b
    print(answer)

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

if a >= 10 or b >= 10:
    print('-1')
else:
    print(a * b)

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
kuku=[]
for i in range(1,10):
  for j in range(1,10):
    kuku.append(i*j)
  
a=int(input())
if a in kuku:
  print("Yes")
else:
  print("No")
  

import math
a=int(input())
list=[]
for i in range(1,int(math.sqrt(a))+1):
  if a%i==0:
    list.append(i+int(a/i)-2)
b=min(list)
print(b)

a=int(input())
print(a*a)

a = input().split(" ")
if int(a[0]) <= 9 and int(a[1]) <= 9:
  print(int(a[0])*int(a[1]))
else:
  print(-1)
    

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A, B = int(input())
if 1<=A & A<=9 | 1<=B & B<=9:
    if 1<=A*B & A*B<=81:
        print (A*B)
    else:
        print (-1)



A, B = map(int, input().split())
if 1<=A & A<=9 & 1<=B & B<=9:
    if 1<=A*B & A*B<=81:
        print (A*B)
    else:
        print (-1)
else:
        print (-1)



A, B = map(int, input().split())
if 1 <= A & A <= 9 & 1 <= B & B <= 9:
    print(A*B)
else:
     print (-1)



A, B = map(int, input().split())
if 1 <= A <= 9 & 1 <= B <= 9:
    print(A*B)
else:
     print (-1)



A, B = map(int, input().split())
if 1<=A | A<=9 | 1<=B | B<=9:
    if 1<=A*B | A*B<=81:
        print (A*B)
    else:
        print (-1)



A, B = map(int, input().split())
if 1<=A & A<=9 & 1<=B & B<=9:
    if 1<=A*B & A*B<=81:
        print (A*B)
    else:
        print (-1)



A, B = map(int, input().split())
if 1<=A & A<=9 & 1<=B & B<=9:
    if 1<=A*B & A*B<=81:
        print (A*B)
    else:
        print (-1)
else:
     print (-1)



A, B = map(int, input().split())
if 1<=A & A<=9 | 1<=B & B<=9:
    if 1<=A*B & A*B<=81:
        print (A*B)
    else:
        print (-1)



A, B = map(int, input().split())
if 1 <= A <= 9 & 1 <= B <= 9:
    print(A*B)
else:
     print (-1)



A, B = map(int, input().split())
if 1 <= A <= 9 and 1 <= B <= 9:
    print(A*B)
else:
     print (-1)



Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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


m = n


a = []
while n % 2 == 0:
    a.append(2)
    n //= 2
f = 3
while f * f <= n:
    if n % f == 0:
        a.append(f)
        n //= f
    else:
        f += 2
if n != 1:
    a.append(n)


x=1

for i in a[::-1]:
  x *= i
  if x*x >= m:
    break

y = m // x
ans = x + y -2

print(ans)



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

if a <= 9 and b <= 9:
  print(a*b)
else:
  print(-1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a,b = map(int,input().split())
if a<10 nad b<10:
  print(a*b)
else:
  print("-1")

a,b = map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print("-1")

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if(a<1 or a>9):
    print(-1)
elif(b<1 or b>9):
    print(-1)
else:
    print(a*b)
    

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

if(a<1 or a>9):
  print(-1)
elif(b<1 or b>9):
  print(-1)
else:
  print(a*b)

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

if(a<1 or a>9):
    print(-1)
elif(b<1 or b>9):
    print(-1)
else:
    print(a*b)
    

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A,B = map(input().split(" "))
if A <= 9 and B <= 9:
  print(A*B)
else:
  print(-1)


A,B = input().split(" ")
if A <= 9 and B <= 9:
  print(A*B)
else:
  print(-1)

A,B = map(int, input().split(" "))
if A <= 9 and B <= 9:
  print(A*B)
else:
  print(-1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a, b = map(int, input().split())
bool1=False
#print(a,"to",b) a=21 b=1 i=3 j=7 out
if 1<=a and a<=20 and 1<=b and b<=20
for i in range(10):
	for j in range(10):
		#print(i)
		if i*j == a*b:
			#print("a")
			bool1=True
			#print(bool1)
			break
		else:
			#print("j={0}".format(j))
			pass
	if bool1==True:
		break
#print(bool1)
if bool1==True:
	print(a*b)
else:
	print(-1)


a, b = map(int, input().split())
bool1=False
#print(a,"to",b) a=21 b=1 i=3 j=7 out
if 1<=a and a<=20 and 1<=b and b<=20:
	for i+1 in range(10):
		for j+1 in range(10):
			#print(i)
			if i*j == a*b:
				#print("a")
				bool1=True
				#print(bool1)
				break
			else:
				#print("j={0}".format(j))
				pass
		if bool1==True:
			break
#print(bool1)
if bool1==True:
	print(a*b)
else:
	print(-1)


a, b = map(int, input().split())
if a<=9 and b<=9:
	print(a*b)
else:
	print(-1)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
if 1 <= A <= 9  1 <= B <= 9
  print(A*B)
else:
  print("-1")


A,B=map(int,input.split())
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print"-1"

A,B=map(int,input.split())
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print("-1")

A,B=map(int,input().split())
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print("-1")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a,b=int(input())
if a<10 and b<10:
  print(a*b)
else:
  print('No')

a,b=map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print('-1')

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

a,b = map(int, input().split())
if (a<10 and b<10):
      print(a*b)
else:
      print(-1)


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if a,b > 9:
  print(a*b)
  else:
    print(-1)

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

if a > 9 or a < 1:
	print(-1)
elif b > 9 or b < 1:
	print(-1)
else:
	print(a*b)
  

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
i = input().split(" ")
mul = i[0]*i[1]
if mul < 81:
  print(mul)
else:
  print(-1)


i = input().split(" ")
m,n = i[0]*i[1]
if m <= 9 and m>=9 and n<=9 and n>=1:
  print(m*n)
else:
  print(-1)


i = input().split(" ")
m,n = i[0]*i[1]
if m < 9 and n<9:
  print(m*n)
else:
  print(-1)


n,m = input().split(" ")
mul = n*m
if mul < 81:
  print(mul)
else:
  print(-1)

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
ar=map(int,input().split())
print(ar[0]<10 and ar[1]<10)

ar=list(map(int,input().split()))
if ar[1]<10 and ar[0]<10:
  print(ar[0]*ar[1])
else:
  print(-1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
n = int(input())
ans = "No"

for x in range(1,10):
	if n/x in [1,2,3,4,5,6,7,8,9]:
		ans = "Yes"

print(ans)

a, b = map(int,input().split())
if(a > 9 or b > 9):
	print("-1")
else:
	print(a * b)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A, B = list(map(int, input().split()))
print(A * B if (A < 10 && B < 10) else -1)

A, B = list(map(int, input().split()))
print(A * B if (A < 10 and B < 10) else -1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):

from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().split()]
if A<1 or A>9 B<1 or B>9:
    ans = -1
else:
    ans = A*B

print(ans)



from sys import stdin

n = int(stdin.readline().rstrip())
l = [1,2,3,4,5,6,7,8,9,2,4,6,8,10,12,14,16,18,3,6,9,12,15,18,21,24,27,4,8,12,16,20,24,28,32,36,5,10,15,20,25,30,35,40,45,6,12,18,24,30,36,42,48,54,7,14,21,28,35,42,49,56,63,64,72,81]
ans = n in l
if ans == True:
    ans = "Yes"
else:
    ans = "No"
print(ans)


from sys import stdin
A, B = [int(x) for x in stdin.readline().rstrip().split()]

if A < 10 and B < 10:
    print(A*B)
else:
    print(-1)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a,b=map(int, input().split())
if a<=9 and b<=9:
  print("a*b")
else:
  print("-1")

a,b =map(int(),input().split())
if a>=10 b>10 :
  print("-1")
else :
  print(a*b)

a,b=map(int, input().split)
if 1<=a<=9, 1<=b<=9:
  print("a*b")
else:
  print("-1")

a,b=map(int, input().split)
if 1<=a<=9 and 1<=b<=9:
  print("a*b")
else:
  print("-1")

A=int(input())
B=int(input())
if 1<=A<=9, 1<=B<=9:
  print("A*B")
else:
  print("-1")

A, B=int(input())
if 1<=A<=9, 1<=B<=9:
  print("A*B")
else:
  print("-1")

a,b = map(int, input().split())
if 1<a,b<9:
  print(a+b)
else:
  print(-1)

a,b=map(int, input().split())
if 1<=a<=9, 1<=b<=9:
  print("a*b")
else:
  print("-1")

a,b=map(int,input().split())
if a>=9 or b>=9 :
  print(-1)
else a<=9 and b<=9 :
  print(a*b)

a,b=map(int,input().split())
if a>9 b>9 
 print("-1")
else :
  print(a*b)

a,b=map(int,input().split())
if a>=10 or b>=10:
  print("-1")
else:
  print("a*b")

a,b=map(int, input().split())
if a<=9 and b<=9:
  print(a*b)
else:
  print("-1")

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a = int(input())
b = int(input())
if 1<=a<=9 and 1<=b<=9:
  print(a*b)
else:
  print(-1)

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

#b = int(input())
if 1<=a<=9 and 1<=b<=9:
  print(a*b)
else:
  print(-1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a,b = int(input().split())
if a <= 9 and b <= 9:
	print(a * b)
else:
	print('-1')	
	

a,b = int(input().split())
if a <= 9 and b <= 9:
	c = a * b
	print(c)
else:
	print('-1')	
	

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

if 1 <= a <= 9 and 1 <= b <= 9:
	print(a * b)
else:
	print('-1')	
	

a, b = int(input().split())
if a <= 9 and b <= 9:
	c = a * b
	print(c)
else:
	print('-1')	
	

a, b = map(int, input().split())
if a <= 9 and b <= 9:
	c = a * b
	print(c)
else:
	print('-1')	
	

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a, b = map(int, input().split())
if a <= 9 and b <= 9:
  return a * b
else:
  return -1

a, b = map(int, input().split())
if a <= 9 and b <= 9:
  print(a*b)
else:
  print(-1)


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if 1<=A,B<=9:
  print(A*B)
else:
  print(-1)

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

if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print(-1)


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a,b=int(input().split())
if a<=9 and b<=9:
  print(a*b)
else:
  print(-1)


#A
a,b=map(int,input().split())
if a<10 and b<10:
    print(a*b)
else:
    print(-1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
n,m=map(str,input().split())
if(len(n)<1 and len(m)<1):
	print(int(n)*int(m))
else:
	print(-1)

n,m=map(s,input().split())
if(len(n)<=1 and len(m)<=1):
	print(int(n)*int(m))
else:
	print(-1)

n,m=map(str,input().split())
if(len(n)<=1 and len(m)<=1):
	print(int(n)*int(m))
else:
	print(-1)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a, b = map(int,input().split())
print('Yes' if a < 10 and b < 10 and a > 0 and b > 0 else 'No')

a, b = map(int,input().split())
print(a*b if a < 10 and b < 10 and a > 0 and b > 0 else -1)

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a, b = map(int, input.split())
if a <10 and b<10:
  	return a*b
else:
  return -1

a, b = map(int, input().split())
if a <10 and b<10:
  print(a*b)
else:
  print(-1)


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A,B = map(input().split())
if A>=10 or B>=10: 
    print(-1)
else:
    print(A*B)

A,B = map(input(split.()))
if A>=10 or B>=10: 
    print(-1)
else:
    print(A*B)

A,B = map(int,input().split())
if A>=10 or B>=10: 
    print(-1)
else:
    print(A*B)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A = Input()
B = Input()

if 1 <= A <= 9 and 1 <= B <= 9:
    print(A * B)
else:
    print(-1)


A, B = map(int, input().split())
if 1 <= A <= 9 and 1 <= B <= 9:
    print(A * B)
else:
    print(-1)


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A, B = list(map(int, (input().split())))
k = -1
if A <= 9 && B <= 9:
  k = A * B
print(k)


A, B = list(map(int, (input().split())))
k = -1
if A <= 9 && B <= 9:
  k = A * B
print(str(k))


A, B = list(map(int, (input().split())))
k = -1
if (A <= 9 ) and ( B <= 9):
  k = A * B
print(str(k))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a, b = map(int, input().split())
if a<=9 and b<=:
    print(a*b)
else:
    print("-1")

a, b = map(int, input().split())
if a<=9 and b<=9:
    print(a*b)
else:
    print("-1")

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
# coding: utf-8
a, b = map(int, input().split())
ans = -1
if a < 10 and b < 10:
    ams = a * b
print(ans)


# coding: utf-8
a, b = map(int, input().split())
ans = -1
if a < 10 and b < 10:
    ans = a * b
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
import sys

N=int(input())
for i in range(1,10):
  if N/i==N//i and N/i<10:
    print("Yes")
    sys.exit()
  else:
    print("No")

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

if A or B>=10:
 print("-1")

else:
 print(A*B)

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

if x<=10 or y<=10:
  print("-1")
else:
  print(x*y)

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

if x>=10 or y>=10:
  print("-1")
else:
  print(x*y)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
n=int(input())
import sys
import math
list=[]


for i in range(0,int(math.sqrt(n))):
    if n%(i+1)==0:
        list.append(i-1+(n/(i+1)))

print(int(min(list)))

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

if x>9 or y>9:
    print(-1)
else:
    print(x*y)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A,B = list(map(int,inpput().split()))
if A > 9 or B > 9:
  print('-1')
  exit()
print(A*B)

A,B = list(map(int,input().split()))
if A > 9 or B > 9:
  print('-1')
  exit()
print(A*B)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if a < 10 and b < 10:
    print(a * b)
else:
    print(-1)



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

if a < 10 and b < 10:
    print(a * b)
else:
    print(-1)



Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
if __name__ == '__main__':

	n = int(input())
	m = int(n//2)
	end = n - 1

    for x in range(2,int(n**0.5)+1):
		if n % x == 0:
			y = n // x
			end = min(x+y-2,end)

	print(end)



if __name__ == '__main__':

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

	if (1 <= A[0] <= 9) and (1 <= A[1] <= 9):
		print(A[0] * A[1])
	else:
		print(-1)


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A, B) = map(int, input().split(' '))
if A < 10 and B < 10:
    print(A * B)
else:
    print('-1')


(A, B) = map(int, input().split(' '))
if A < 10 and B < 10:
    print(str(A * B))
else:
    print('-1')



Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
i = int(input().split(' '))
if i[0]<10 and i[1]<10:
	print(i[0]*i[1])
else:
	print(-1)

abc = input()
abc_int = int(abc)
prolist = []
chk = int(abc_int**0.5)+2
for c1 in range(chk):
	if abc_int % c1 == 0:
		prolist.append(c1+abc_int//c1-2)
print(min(prolist))

j=input()
i = j.split(' ')
k = []
for c in i:
    k.append(int(c))
if k[0]<10 and k[1]<10:
	print(k[0]*k[1])
else:
	print(-1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
    x, y = map(int, input().split())
    if 0 < x < 10 and 0 < y < 10:
        print(x * y)
    else:
        print(-1)

x, y = map(int, input().split())
if 0 < x < 10 and 0 < y < 10:
    print(x * y)
else:
    print(-1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
n, m = map(int, input())

if n <= 9 and m <- 9:
  print(n * m)


n, m = map(int, input())
 
if n <= 9 and m <= 9:
  print(n * m)
else:
  print(-1)

n, m = map(int, input().split())
 
if n <= 9 and m <= 9:
  print(n * m)
else:
  print(-1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

if (1 <= A <= 9) and (1 <= B <= 9):
  return A * B
else: return -1

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

if (1 <= A <= 9) and (1 <= B <= 9):
  print( A * B )
else: print( -1 )

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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

A,B = map(int, input().split())
if A<=9:
  if B<=9:
    print(A*B)
  else:
    print(-1)
else:
  print(-1)

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
A,B = map(int(input().split()))
if A>0 and A<10 and B>0 and B<10:
	print(A*B)
else:
	print(-1)

import math
A = int(input())
B = int(math.sqrt(A))
count = 0
for i in reversed(range(1,B+1)):
	if count == 0:
		if A % i == 0:
			print(int(i+A/i-2))
			count += 1

A,B = map(int,input().split())
if A>0 and A<10 and B>0 and B<10:
	print(A*B)
else:
	print(-1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

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


a,b=int(input().split())
if a<10 and b<10:
    print(a*b)
else:
    print(-1)


a,b=map(int,(input().split()))
if a<10 and b<10:
    print(a*b)
else:
    print(-1)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.  Given are two integers A and B.  If Takahashi can calculate A \times B, print the result; if he cannot, print `-1` instead.

Submission attempts (in order):
a, b = map(int, input().split())
if 1 <= a <= 9 and 1<= b <= 9:
	c = a * b
else:
	print ('-1')

a, b = map(int, input().split())
if 1 <= a <= 9 and 1 <= b <= 9:
	c = a * b
else:
	print (-1)

a, b = map(int, input().split())
if 1 <= a <= 9 and 1 <= b <= 9:
    print(a * b)
else:
	print ('-1')

Verdicts: Wrong Answer

Wrong Answer

Accepted