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(i) for i in input().split()]
List_9 = []
for i in range(1, 10):
    for j in range(1, 10):
        List_9.append(i * j)
        
if A * B in List_9:
    print(A * b)
else:
    print(-1)

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

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)

#ABC144_C

import math

init_N=int(input())
N=init_N
ans_list=[]
A=1
B=1

for i in range(2,int(math.sqrt(init_N))+1):
    while 1:  
        if N%i==0:
            ans_list.append(i)
            N=N//i
        else:
            break
if N==1:
    pass
else:
    ans_list.append(N)

if len(ans_list)==1:
    print(str(init_N-1))
else:
    while len(ans_list)>0:
        A=A*ans_list.pop(0)
        #print(A)
        if len(ans_list)!=0:
            B=B*ans_list.pop(0)
            
    print(str(A+B-2))



#ABC144_C

import math

init_N=int(input())
N=init_N
ans_list=[]
A=1
B=1

for i in range(2,int(math.sqrt(init_N))+1):
    while 1:  
        if N%i==0:
            ans_list.append(i)
            N=N//i
        else:
            break
if N==1:
    pass
else:
    ans_list.append(N)

if len(ans_list)==1:
    print(str(init_N-1))
else:
    while len(ans_list)>0:
        A=A*ans_list.pop(0)
        print(A)
        if len(ans_list)!=0:
            B=B*ans_list.pop(0)
            print(B)
    print(str(A+B-2))



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

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

a = int(input())
if a % 1 == 0 or a % 2 == 0 or a % 3 == 0 or a % 4 == 0 or a % 5 == 0 or a % 6 == 0 or a % 7 == 0 or a % 8 == 0 or a % 9 == 0:
  print('Yes')
else:
  print('No')

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


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

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

a,b=(int(x) for x in 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(input().slice())
if a <= 0 or a >= 10:
  return -1
if b <= 0 or b >= 10:
  return -1
return a*b

a, b = map(int, input().split())
if a <= 0 or a >= 10:
    print("-1")
elif b <= 0 or b >= 10:
    print("-1")
else:
    print("{}".format(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())
a=[]
for i in range(1,10):
    for j in range(1,i+1):
        a.append(i*j)
if n in a:
  print("Yes")
else:
  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):
A, B = int(input())
if(A>9 or B>9):
  print("-1")
elif(A>10 and B>10):
  print("-1")
else:
  ans=A*B
  print(ans)

A, 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")
elif(A>10 and B>10):
  print("-1")
else:
  ans=A*B
  print(ans)

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 = 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 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):
def prime_factors(n):
    i = 2
    factors = 1
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors = i
    if n > 1:
        factors = i
    return factors
N = int(input())
large_factor = prime_factors(N)
print(int(large_factor+(N/large_factor)-2))

A, B = map(int, raw_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):
N = int(input())
M = [x*y for y in range(1,10) for x in range(1,10)]

if N in M:
    print('Yes')     
else:
    print('No')  

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):
input = int(input())
chars = [i for i in range(1,10)]
for n in chars:
  if input / n in chars:
    print("Yes")
    quit()
print("No")

input = [int(i) for i in input().split()]
for i in input:
  if i > 9 or i < 1:
    print(-1)
    quit()
print(input[0] * input[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):
string = input()

v = string.split(" ")

if not len(v) == 2:
  return -1

a = int(v[0])
b = int(v[1])

if 0 < a < 10 and 0 < b < 10:
  return a * b

return -1

string = input()
 
v = string.split(" ")
 
if not len(v) == 2:
  print(-1)
 
a = int(v[0])
b = int(v[1])
 
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):
def kakezan():
    if (1 <= a <= 9) and (1 <= b <= 9):
        return a * b
    else:
        return -1

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

print(kakezan())

def kakezan():
    if (1 <= a <= 9) and (1 <= b <= 9):
        return a * b
    else:
        return -1

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

print(kakezan())

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

result = 0
for i in range(0,3):
    if S[i] == T[i]:
        result += 1

print (result)

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

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

else:
print ( -1 )
  

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

if ( ( 1 <= A <= 9 ) and( ( A % 1 == 0 ) or ( A % 2 == 0 ) or ( A % 3 == 0 ) or ( A % 5 == 0 ) or ( A % 7 == 0 ) ) ) and ( ( 1 <= B <= 9 ) and( ( B % 1 == 0 ) or ( B % 2 == 0 ) or ( B % 3 == 0 ) or ( B % 5 == 0 ) or ( B % 7 == 0 ) ) ):
    print(A*B)
else:
    print ( -1 )

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: 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):
#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    
   	if A > 9 or B > 9:
      print(-1)
    else:
      print(A * B)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(N, L)

if __name__ == '__main__':
    main()


#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    
    if A > 9 or B > 9:
        print(-1)
    else:
        print(A * B)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()


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=input().split()
if len(A) or len(B) >= 2:
  print("-1")
else:
  print(int(A)*int(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 <10 and B <10:
  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 = int(input())
B = int(input())
if 1 <= A and A <=9 and 1 <= 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,input().split())
if A < 10 & B < 10:
  print(A * B)
else:
  print(-1)

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

m = input()
n = m.split(" ")
if (int(n[0])<=9 and int(n[1])<=9):
    print(int(n[0])*int(n[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 = 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

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

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

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

if a>0 and 10>a and b>0 and 10>b:
    print(a*b)

else:
    print(-1)


import sys

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

if a>0 and 10>a and b>0 and 10>b:
    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())

ans="no"

for i in range(9):
  if n%(9-i)==0:
    if n/(9-i)<10:
      ans="yes"
print(ans)

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

#ABC144A
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):
import sys

def jeat(a, f, x, K):
    N = 0
    for i in range(len(a)):
        if a[i]*f[i] > x:
            N += a[i] - x // f[i]
    if N > K:
        return False
    if N <= K:
        return True

N,K = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
F = list(map(int, input().split(' ')))
if K >= sum(A):
    print(0)
    sys.exit()
A.sort()
F.sort(reverse = True)
a = 0
b = 10**13
while (True):
    z = (a+b)//2
    if jeat(A,F,z,K) == True:
        if jeat(A,F,z-1,K) == False:
            break
        b = z-1
    else:
        if jeat(A,F,z+1,K) == True:
            z += 1
            break
        a = z+1

print(z)

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

try:
    A = int(input())
    B = int(input())
    if 1 <= A <= 9 and 1 <= B <= 9:
        print(A*B)
    else:
        print("-1")
except:
    print("整数ではありません")

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

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())
if a > 10 | 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: 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 > 9 or b > 9 :
  print(-1)
else :
  print(a*b)


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

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

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


a=int(input())
b=int(input())
if(a>=10):
    print(-1)
elif(b>=10):
    print(-1)
else:
    print(a*b)
    
#print(a+1)
#print(b+1)

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

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

if num1 >= 10 or num2 >= 10 :
    print(-1)
else:
    print(num1 * num2 )


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

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


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


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

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()
print(A*B)

a,b,=int(input())
if a>=10 or b>=10:
    print(-1)
    break:
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):
def input_int:
    hoge = input().split()
    A = int(hoge[0])
    B = int(hoge[1])
    return A, B

if __name__ == "__main__":
    A, B = input_int()
    if A >=10 && B >= 10:
        ret = A * B
    else:
        ret = -1
    print(ret)



if __name__ == "__main__":
    A, B = 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):
import math


N = int(input())

ans = 10**12
square = math.ceil(math.sqrt(N))
for i in range(1, square):
    if N%i == 0:
        ans = min(ans, int(N/i))
b = int(N/ans)
print(ans + b-2)

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 A/10 >1 and B/10 > 1:
  print(A*B)
else:
  print(-1)

A,B=map(int,input().split())
if A/10 <1 and B/10 < 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):
from sys import stdin

a,b = int(stdin.readline().rstrip().split())

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

from sys import stdin

a,b = [int(x) for x in stdin.readline().rstrip().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):
n=int(input())
a=0
for i in range(9):
  for j in range(9):
    if n==(i+1)*(j+1):
      print("Yes")
      a+=1
      break
  if a!=0:
    break
if a==0:
  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):
#!/usr/bin/python3
# coding: utf-8


def I(): return int(input())


def IsIl(): return list(map(lambda x: int(x), input().split()))


def InIl(n): return [input() for i in range(n)]


def IsIt(): return map(lambda x: int(x), input().split())


def InIl(n): return map(input() for i in range(n))


def SsSl(): return list(map(lambda x: x, input()))




def SSd():
    from collections import defaultdict
    A = input() 
    dd=defaultdict(int)
    for a in A:
        dd[a]+=1
    return dd

n,m=IsIt()

if n*m > 81:
    print(-1)
else:
    n*m



#!/usr/bin/python3
# coding: utf-8


def I(): return int(input())


def IsIl(): return list(map(lambda x: int(x), input().split()))


def InIl(n): return [input() for i in range(n)]


def IsIt(): return map(lambda x: int(x), input().split())


def InIl(n): return map(input() for i in range(n))


def SsSl(): return list(map(lambda x: x, input()))




def SSd():
    from collections import defaultdict
    A = input() 
    dd=defaultdict(int)
    for a in A:
        dd[a]+=1
    return dd

n,m=IsIt()

if 1 <= n and n <= 9 and 1 <= m and m <= 9:
    print(n*m)
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):
import numpy as np
import sys
sys.setrecursionlimit(10000)
def culc(s,x,m,F_array,eat_time):
   
    K_sum = eat_time/F_array
    must_del = K_sum[K_sum > x]
    must_del = must_del - x
    sum_del = int(np.sum(must_del))
    print(x)
    print(sum_del)
    if sum_del == x:
        return x

    if sum_del > x:
        s = x
        x = int((x+m)/2)
        return culc(s,x,m,F_array,eat_time)
    else:
        m = x
        x = int((x+s)/2)
        return culc(s,x,m,F_array,eat_time)


import numpy as np
N,K = map(int,input().split())
A_list =  list(map(int, input().split()))
F_list =  list(map(int, input().split()))
s = 0
m = 1.0e+18
x = 5.0e+17
eat_time = []
A_list.sort() #min max
F_list.sort(reverse=True) #max -min

A_array = np.array(A_list)
F_array = np.array(F_list)
eat_time =A_array*F_array

print(culc(s,x,m,F_array,eat_time))

x = int(input())
flag = 0
if x < 10:
    print("Yes")
for l in range(1,10,1):
    num =x/l
    mod = x % l
    if num < 10 and mod == 0:
        flag =1
        break
if flag == 1:
    print("Yes")
else:
    print("No")

x,y=map(int,input().split())
if x<10 and y<10:
    print(x*y)
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):
N = int(input())
for i in range(9):
  for j in range(9):
    if (i+1)*(j+1)==N:
      print("yes")
      exit()
print("No")

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())
s = N-1
a = N
b = 1
for i in range(int(N**0.5)+1, 1, -1):
        if N%i == 0:
            a = i
            b = N//i
            s = a + b -2
            break

print(s)









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

else:
    print(-1)

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

else:
    print(-1)

N = int(input())
s = N-1
for i in range(1, int(N**0.5) + 1):
    for j in range(1, int(N**0.5) + 1):
        if N == i * j:
            flag = i + j - 2

            if flag <= s:
                s = flag

print(s)

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

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):
x,y = list(map(int,input().split()))
if x < 10 abd y < 10:
	print(x*y)
    exit()
else:
  print('-1')


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


n = int(input())
print(n**2)

x,y = list(map(int,input().split()))
if x < 10 and y < 10:
	print(x*y)
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 = 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<=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 >= 1 or B >= 10:
    print(-1)
    exit()

ans = A * B
print(ans)

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

if 1 <= A <= 9 and 1 <= 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):
n = int(input())
c = set([])
for i in range(1,10):
  for j in range (1,10):
    c.add(i * j)
print("Yes") if n in c else print("No")
    

n = [int(i) for i in input().split(" ")]
if max(n) < 10:
  print(n[0] * n[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):
import math
n = int(input())
n1 = int(math.sqrt(n))
cnt = 10**18
for i in range(1, n1+1):
  if n % i == 0:
      j = (n/i) - 1
      ans = i-1
      cnt = min(cnt, j+ans)
  else:
    continue
print(int(cnt))

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

a = int(input())
list1 = []
for i in range(9):
  for j in range(9):
    list1.append((i+1)*(j+1))
b = len(list1)
flag = 0
for k in range(b):
  if a == list1[k]:
    flag = 1
    break;
if flag == 1:
  print("Yes")
else:
  print("No")

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

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

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

if((A <= 9 )and(B <= 9)):
  ans = A*B
else:
  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):
A = int(input())
B = int(input())
if A<=9 & B<=9:
  print(A*B)
else:
  print(-1)

import sys

N =int(input())

for a in range(1,10):
  for b in range(1,10):
    if a*b == N:
      print('yes')
      sys.exit()
print('no')

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

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

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

for A in range(1, 10):
    for B in range(1, 10):
        if N == A*B:
            print('Yes')
            True
            break
if False:
  print('No')

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

N = int(input())
if make_divisors(N)[0] < 10 and make_divisors(N)[1] < 10:
    print('Yes')
else:
    print('No')

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

a,b = list(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())
x = []
result = "No"
for i in range(1, 10):
    for j in range(i, 10):
        x.append(i*j)
print(x)
if N in x:
    result = "Yes"
print(result)

a, b = map(int, input().split())
result = -1
if a in [1, 2, 3, 4, 5, 6, 7, 8, 9]:
    if b in [1, 2, 3, 4, 5, 6, 7, 8, 9]:
        result = a*b
print(result)


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 fractions

input = sys.stdin.readline

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

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


import sys
 
input = sys.stdin.readline
 
a,b = (int(x) for x 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):
A=int(input())
B=int(input())
if A<=0 or 10<=A:
    print(-1)
elif B<=0 or 10<=B:
    print(-1)
else:
    print(A*B)


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

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


N=int(input())
if N>81:
    print("No")
else: 
    if N in (1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,21,24,25,27,28,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())
if A>9 or A<1:
    print("{}".format(-1))
else:
    if B>9 or B<1:
        print("{}".format(-1))
    else:
        print("{}".format(A*B))


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 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):
# -*- coding: utf-8 -*-
def main():
    A,B = int(input())
    if 1=< A < 10 and 1<= B < 10:
        print(A*B)
    else:
        print('-1')

if __name__ == '__main__':
    main()

# -*- coding: utf-8 -*-
def main():
    A,B = map(int,input().split())
    if 1 <= A < 10 and 1<= B < 10:
        print(A*B)
    else:
        print('-1')

if __name__ == '__main__':
    main()

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())
flag=0
for A in range(1,10):
  for B in range(1,10):
    if N==A*B:
      flag=1
      break
 
print( "Yes" if flag == 1 else "No" )

#if flag==0:
#  print('NO')
#else:
#  print('YES')

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

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

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()) 
factor = []
tmp = int(math.sqrt(N)) + 1
list = range(2,tmp)
for num in list[::-1]:
    while N % num == 0:
        N //= num
        factor.append(num)
        factor.append(N)
    if not factor:
        factor.append(N)
        factor.append(0)
    else:
        pass
    break
f=sum(factor)-1
print(f)

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

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= [int(i) for i in input().split()]

if A>=10orB>=10:
  print(-1)
else:
  print(A*B)
 

A, B= [int(i) for i in 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):
n,m=map(int,input().split())
if n>9 or m>9 :
    
    print(-1)
else:
    print()


n,m=map(int,input().split())
if n>9 or m>9 :

    print(-1)
else:
    print(n*m)
    

Verdicts: Wrong Answer

Accepted