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):
numz = input()
count = 0
numz_pair = numz.split(" ")
numz_pair = list(map(int, numz_pair))

for i in range(len(numz_pair)):
    if numz_pair[i] <= 9:
        count = count + 1
        print("True")
    else:
        print(-1)
        break

if count == len(numz_pair)+1:
    print(numz_pair[0]*numz_pair[1])


numz = input()
count = 0
numz_pair = numz.split(" ")
numz_pair = list(map(int, numz_pair))

for i in range(len(numz_pair)):
    if numz_pair[i] <= 9:
        count = count + 1
    else:
        print(-1)
        break

if count == len(numz_pair):
    print(numz_pair[0]*numz_pair[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):
def m():
     num = input().split()
     l = []
     for i in num:
             l.append(int(i))
     if l[0] >= 10 or  l[1] >= 10:
             print("-1")
     else:
             a = l[0] * l[1]
             print(a)

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):
x = input().split()
a = int(x[0])
b = int(x[0])
if a <= 9 and b <= 9:
  print(a * b)
else:
  print('-1')

x = input().split()
a = int(x[0])
b = int(x[1])
if a <= 9 and b <= 9:
  print(a * b)
else:
  print('-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 =< 9:
  if B =< 9:
    x = A*B
  else x = -1
else x = -1

print(x)
		

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

if A <= 9:
  if B <= 9:
    x = A*B
  else:
    x = -1
else:
  x = -1

print(x)
		

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<10 and b<10:
  print(a*b)
  
else:
  print('-1')

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


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

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

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('a').split())
 
if A > 10 and B > 10:
    print(A*B)
else:
    print(-1)

def takahashi(A,B):
    if A >10 and B > 10:
        print(A * B)
    else:
        print('-1')

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

takahashi(A,B)

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

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

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

A = int(input('数字を入力してくださいA'))
B = int(input('数字を入力してくださいB'))

takahashi(A,B)

def takahashi(A,B):
    if A and B > 10:
        print(A * B)
    else:
        print('-1')

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

takahashi(A,B)

A = int(input())
B = int(input())
 
def takahashi:
  if A and B >= 1:
  	if A and B <= 9:
    
    else print('-1')
    	print(A * B)

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

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, b = list(map(int, input()))
if a >= 10 or b >= 10:
	print(-1)
else:
	print(a*b)

a, b = list(map(int, input().split()))
if a >= 10 or b >= 10:
    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):
import sys
 
def main():
  a = sys.argv
  i1 = int(a[1])
  i2 = int(a[2])

  if i1 < 10 and i2 < 10:
    return i1 * i2
  else:
    return -1

main()

a,b = input()
ai = int(a)
bi = int(b)

if ai < 10 and bi < 10:
  print(ai * bi)
else:
  print(-1)

import sys

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

if i1 < 10 and i2 < 10:
  return i1 * i2
else:
  return -1
  
  

import sys
 
a = sys.argv
i1 = int(a[1])
i2 = int(a[2])
if i1 < 10 and i2 < 10:
  print(i1 * i2)
else:
  print(-1)


import sys
 
def main():
  a = sys.argv
  i1 = int(a[1])
  i2 = int(a[2])

  if i1 < 10 and i2 < 10:
    return i1 * i2
  else:
    return -1


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

Verdicts: 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):
i = int(input())
list = []

if i % 2 == 0:
    for m in range(2, int((i+2)/2) + 1):
        if i % m == 0:
            list.append(m + i / m)

if i % 2 == 1:
    for m in range(1, int((i+1)/2), 2):
        if i % m == 0:
            list.append(m + i / m)


list.sort()
print(int(list[0]-2))


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

if i[0] <= 9:
    if i[1] <= 9:
        print(i[0] * i[1])
    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):
x = int(input())
y = int(input())
if x > 9:
    print(-1)

elif y > 9:
    print(-1)

else:
    print(x*y)


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

if x > 9:
    print(-1)

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

if a <= 2*b:
    print(0)
else:
    print(a - 2*b)



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

if 1<= a <= 9 and 1 <= b <= 9 and a % 1 == 0 and b % 1 == 0:
    print(int(a*b))
else:
    print(-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=int(input())
B=int(input())

C=A*B

if C>81:
	print("-1")
elif C<1:
	print("-1")
else:
	print(C)

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

C=A*B

if C>81:
	print(-1)
elif C<1:
	print(-1)
else:
	print(C)

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 a // 10 == 0 and b // 10:
  print(a*b)
else:
  print(-1)

a, b = map(int, input().split())
if a // 10 == 0 and b // 10 == 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):
import math
a,b,x = map(int,input().split())
if x / a >= (a*b/2):
    print(math.degrees(math.atan((2*b/a)-2*x/(a**3))))
else:
    if a < b:
        print(math.degrees(math.atan(a*b*b/(2*x))))
    else:
        print(math.degrees(math.atan(2*x/(a*b*b))))


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 <= 1 and a <= 9 and b <= 1 and b <= 9:
    print(a*b)
else:
    print(-1)


a,b = map(int, input().split())
if 1 <= a and a <= 9 and 1 <= b and b <= 9:
    print(a*b)
else:
    print(-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())
ans = a*b
if a>9 or b>9:
  ans = -1
print(ans)

a,b = map(int,input().split())
ans = a*b
if a>9 or b>9:
  ans = -1
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):
n = int(input())
for i in range(1, 10)
    for j in range(1, 10)
		if n == i * j:
			print("Yes")
			break
 
print("No")



def solve():
    N, M = map(int, input().split())
    return N*M if max(N, M) < 10 else -1

print(solve())

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

if (a < 10 or 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 = list(map(int, input().split()))
if a > 10 and b < 10:
    print(a*b)
else:
    print(-1)


a, b = list(map(int, input().split()))
if a < 10 and b < 10:
    print(a*b)
else:
    print(-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 = [int(i) for i in input().split]

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

a,b = [int(i) for i in 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):
import math
n=int(input())
l=[0]
b=0
for i in range(1,n,1):
  if n%i==0 and n/i>=i:
    a=i+(n/i)
    l.append(a)
  else:
    b+=1
    
c=min(l)  
print(c-2)

    
    
    


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

def divisor(n):
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table
 
if len(divisor(N)) < 3:
    print(N - 1)
else:
    divisor_list = divisor(N)
    tmp = N
    for i in divisor_list:
        A = i
        B = N / i
        if tmp > (A + B - 2):
            tmp = (A + B - 2)
    print(int(tmp))


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

if (0 < A) & (A < 10):
    if (0 < B) & (B < 10):
        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):
N = int(input())

for i in range(10):
    for j in range(10):
        if N == i*j:
            print('Yes')
        if i*j == 81 and N!=81:
            print('No')
        if N == i*j:
            break
    if N== i*j:
        break


N = int(input())

for i in range(10):
    for j in range(10):
        if N == i*j:
            print('Yes')
        if i*j == 81 and N!=81:
            print('No')
        if N == i*j:
            break
    if N== i*j:
        break


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

def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n = int(n/i)
            table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table

l = prime_decomposition(n)
l.append(1)
l.sort()
l.reverse()
a = 1
b = 1

for i in range(len(l)):
    if a <= b:
        a *= l[len(l)-1-i]
    else:
        b *= l[len(l)-1-i]

print(a+b-2)

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):
if 1<=A<=9:
  if 1<=B<=9:
    C=A*B
    print(C)
  else print(-1)
else print(-1)

ygfgfuh

if 1<=A<=9:
  if 1<=B<=9:
    print(A*B)
  elif 10<=B<=20:
    print(-1)
elif 10<=A<=20:
  print(-1)

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

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

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

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

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

Verdicts: 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):
import numpy as np
 
a,b=map(int,input().split())
A=np.array(sorted(list(map(int,input().split()))))
F=np.array(sorted(list(map(int,input().split())),reverse=True))
 
s=A.sum()
 
x=-1
y=10**12
while x+1<y:
  mid=(x+y)//2
  if s-np.minimum(A,mid//F).sum()<=b:
    y=mid
  else:
    x=mid
print(y)

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())
print(a＊b if 0<a<10 & 0<b<10 else -1)

a, b = map(int, input().split())
print(a*b if (0<a<10) & (0<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 and b>9:
    print(-1)
else:
    print(a*b)

N = int(input())

for i in range(1,10):
    for j in range(1,10):
        if i * j == N:
            print("Yes")
            quit()
print("No")


a,b = list(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())
print("1" if 1<=a,b<=9 else "-1")

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

a,b=map(int,input().split())
f= 0<a<10 and 0<b<10
print(a*b if f is True else "-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, B = map(int.input().split())
if (0<=A<=9) and (0<=B<=9):
  print(A*B)
else:
  print(-1)

A, B = map(int,input().split())
if (0<=A<=9) and (0<=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 = int(input())
B = int(input())

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

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

if A[0] <= 9 and 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<=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: 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 = list(map(int, input().split()))
if A <= 9 and B =< 9 :
	print(A * B)
else :
	print(-1)

A, B = list(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):
N = int(input())
if(N in [1, 2, 3, 4, 5, 6, 7 ,8 ,9, 10, 12, 14, 15, 16, 18, 20, 21 ,24, 25, 27, 30, 32, 35, 36, 40, 42, 45, 48, 49, 54, 56, 63, 64 ,72, 81]):
    print("Yes")
else:
    print("No")


import sys
input = sys.stdin.readline
N = int(input())

List = []
for i in range(1,10**4):
    for j in range(1,10**4):
        if N == i*j:
            List.append(i+j)

print(min(List)-2)

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

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


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

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

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

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

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

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

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

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, K = map(int, input().split())
A = list(map(int, input().split()))
F = list(map(int, input().split()))
A.sort()
F.sort(reverse=True)

l = 0
r = max(a * f for a, f in zip(A, F)) + 1

while l < r:
    m = (l + r) // 2
    if sum(max(a - m // f, 0) for a, f in zip(A, F)) <= K:
        r = m
    else:
        l = m + 1

print(r)

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())
num = [1, 2, 3, 4, 5, 6, 7, 8, 9]
for i in reversed(range(2, 10)):
    if N % i == 0 and int(N / i) in num:
        count = 1
        break
    else:
        count = 0
if count == 1:
    print("Yes")
else:
    print("NO")

N =int(input())
num = [1, 2, 3, 4, 5, 6, 7, 8, 9]
for i in reversed(range(1, 10)):
    if N % i == 0 and int(N / i) in num:
        count = 1
        break
    else:
        count = 0
if count == 1:
    print("Yes")
else:
    print("NO")

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

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

import math
c=(a*a*b-x)*2

if c<a*a*b:
  d=c/(a*a)
  print(math.degrees(math.atan(d/a)))
else:
  f=(2*x)/a*b 
  print(math.degrees(math.atan(b/f)))

a,b=map(int,input().split())
if a>=10 or b>=10:
  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()))
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

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=int(input().split())
if n>9 or m>10:
    print(-1)
else:
    print(n*m)

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):
1<=A<=20
1<=B<=20
A,B=map(int,input().split()) 
if A>=10 or B>=10 or A<=0 or B<=0:
    print(-1)
else:
    print(A*B)

A,B=map(int,input().split()) 
if 1<=A<=20 and 1<=B<=20 and 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 = int(input())
B = int(input())
if A < 10 and B <10:
  ans = (A * B)
else:
  ans = int(-1)
print(ans)

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):
# -*- coding: utf-8 -*-
"""
Created on Wed Nov  6 21:49:38 2019

@author: over-
"""

N=int(input())

ans=N
for i in range(1,10**12):
    if i > N: break
    if N%i == 0:
        A=(N/i-1)+(i-1)
        if A < ans:
            ans = A
            
print(int(A))

# -*- coding: utf-8 -*-
"""
Created on Wed Nov  6 21:44:44 2019

@author: over-
"""

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

# -*- coding: utf-8 -*-
"""
Created on Wed Nov  6 21:44:44 2019

@author: over-
"""

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):
N, K = map(int, input().split())
A = list(map(int, input().split())) 
F = list(map(int, input().split())) 
 
import math
import numpy
 
A.sort(reverse = True)
F.sort()

arrA = np.array(A)
arrF = np.array(F)

range_max = max(arrA * arrF) + 1
range_min = max(min((A-K) * B), 0)
 
my_lambda = lambda x: sum([max(math.ceil(A[i] - x/F[i]), 0) for i in range(0, N)]) <= K
 
my_range = range(range_min, range_max)
 
def node(lst):
    len_lst = len(lst)
    if len_lst % 2 == 0:
        mid_idx = int(len_lst/2)
    else:
        mid_idx = int(math.floor(len_lst/2))
 
    if len_lst == 1:
        print(lst[mid_idx])
        return()
 
    if my_lambda(lst[mid_idx-1]) == True:
        left = lst[0:mid_idx]
        node(left)
    else:
        right = lst[mid_idx:]
        node(right)
node(my_range)

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())
print(a,b)
if 0<a<10 and 0<b<10:
  c=a*b
  print(c)
else:
    print(-1) 

a,b=map(int,input().split())
if 0<a<10 and 0<b<10:
  c=a*b
  print(c)
else:
    print(-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 > 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

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 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):
a, b = map(int, input())
if a >= 10 or a >= 10:
    print(a * b)

else:
    print(-1)

a, b = map(int, input())
if a >= 10 or b >= 10:
    print(int(a * b))

else:
    print(-1)


a, b = map(int, input())
if a >= 10 or b >= 10:
    print(a * b)

else:
    print(-1)


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

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

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

#coding:utf-8
a, b = map(int, input().split())

if a >= 10 or b >= 10:
    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 = input()
b = input()

if (a >= 1 and a <= 9 and b >= 1 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

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

valid = range(1, 10)
if a in valid and b in valid:
  print(a*b)
else:
  print(-1)

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

valid = range(1, 10)
if a in valid and b in valid:
    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())
if max(a,b)<=9 and min(a,b)>=1:
    print(a*b)
else:print(-1)
    

a,b=map(int,input().split())
if max(a,b)<=9 and min(a,b)>=1:
    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 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)

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):
#include <bits/stdc++.h>
using namespace std;
int solve()
{
    int a, b;
    string str;
    cin >> a >> b;
    if (a > 9 || b > 9)
        return -1;
    return a * b;
}
int main()
{
    cout << solve() << endl;
}

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

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

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

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

if 1 <= a and a <= 9 and 1<= b 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, inpuot().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):
a, b = map(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

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 ( 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,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 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 = input()
a = int(a)
b = input()
b = int(b)
if a < 10 && b < 10:
  print(a * b)
else:
  print(-1)

nums = [int(e) for e in input().split()]
if nums[0] < 10 and nums[1] < 10:
    print(nums[0] * nums[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 = list(map(int,input.split(" ")))
if max(A) > 9:
	print("-1")
else:
	print(str(A[0] * A[1]))

A = list(map(int,input().split(" ")))
if max(A) > 9:
	print("-1")
else:
	print(str(A[0] * A[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 > 0 and a < 10:
    if b > 0 and b < 10:
        print(a*b)
     else:
         print(-1)
else:
    print(-1)

a,b = (int(x) for x in input().split())
if a > 0 and a < 10:
    if b > 0 and b < 10:
        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):
    n = int(input())
    b = False
    i=1
    while i<=9:
        j=1
        while j<=9:
            if j*i==n:
                print('Yes')
                b = True
                break
            if j*i>n:
                break
            j+=1
        i+=1
    if b==False:
        print('No')

n = int(input())
b = False
i=1
while i<=9:
    j=1
    while j<=i:
        if j*i==n:
            print('Yes')
            b = True
            break
		j+=1
    if j*i>n:
        break
    i+=1
if b==False:
    print('No')


    n = int(input())
    b = False
    i=1
    while i<=9:
        j=1
        while j<=i:
            if j*i==n:
                print('Yes')
                b = True
                break
            j+=1
        i+=1
    if b==False:
        print('No')

A, B = input().split(" ")
A = int(A)
B = int(B)
if A>=1 and A<=9 and B>=1 and B<=9:
    r = A*B
    print(r)
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):
n = int(input())
 
for i in range(1,10):
  if(n%i == 0 and n/i <10):
    print('Yes')
    break
else:
  print('No')

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=int(input())
b=int(input())
if 0<a<10 and 0<b<10:
  print(a*b)
else:
  print('-1')


a,b=input().split()
a=int(a)
b=int(b)
if 0<a<10 and 0<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 1 >=(A,B)<=9:
    print(A*B)
elif:
    print(-1)

A,B = map(int, input().split())
 
if 1 >=A<=9 and 1>=B<=9:
    print(A*B)
elif:
    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 A<=9 and 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):
nim = int(input())
for i in range(1,10):
    if nim%i == 0:
        mike = nim//i
if mike <= 9:
    print("Yes")
else:
    print("No")

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

a, b = map(int, (input().split()))
print(a * b if a <= 9 and 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 = input().split()
 
if a[0]>=10 or a[1]>=10:
  return -1
else:
  return a[0]*a[1]

a = list(map(int, input().split()))
 
if a[0]>=10 or a[1]>=10:
  return -1
else:
  return a[0]*a[1]

a = input().split()

if a[0]>=10 or a[1]>=10:
  return -1
elif:
  return a[0]*a[1]

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

if a[0]>=10 or a[1]>=10:
    print(-1)
else:
    print(a[0]*a[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=map(int,input().split())

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Accepted