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

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):
def main():
    A, B = map(int,input().split())
    print( A * B if (A % 10 == 0) & (B % 10 == 0) else -1) 
    return 0
    
if __name__ == '__main__':
    main()

def main():
    A, B = map(int,input().split())
    print( A * B if (A // 10 == 0) & (B // 10 == 0) else -1) 
    return 0
    
if __name__ == '__main__':
    main()

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

print(n**2)


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):
import math
a,b,x = map(float,input().split())

c = a/(2*b-(2*x)/(a*a))
d = (2*x)/(a*b*b)
if x/a >= a*b/2:
  result = math.atan(c)
else:
  result = math.degrees(math.atan(d))
print(result)
  

import math
a,b,x = map(float,input().split())

c = a/(2*b-2*x/a**2)
d = (2*x)/(a*b**2)
if x/a >= a*b/2:
  result = math.atan(c)
else:result = math.degrees(math.atan(d))
print(result)

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

Verdicts: Runtime Error

Runtime Error

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 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print({}.ans)
else :
    print(str(-1))A, B = (int(i) for i in input().split())  
if 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print(ans)
else :
    print(str(-1))

A, B = (int(i) for i in input().split())  
if 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print({}.ans)
else :
    print(str(-1))

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

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

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

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

Verdicts: Wrong Answer

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

for line in sys.stdin:
    a, b, x = list(map(int, line.split(' ')))

    water_height = x / (a*a)

    r = math.atan(water_height/b*2)

    print(math.degrees(r))


import sys

for line in sys.stdin:
    N = int(line)
    found=False
    for i in range(1, 10, 1): 
        if N % i == 0 and N // i <= 9:
            found = True
            break
    if found:
        print('Yes')
    else:
        print('No')

import sys

for line in sys.stdin:
    A, B = list(map(int, line.split(' ')))


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

Verdicts: Runtime Error

Runtime Error

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

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

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


Verdicts: Runtime Error

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

Submission attempts (in order):
n=int(input())
for i in range(9):
    for j in range(9):
        k = (i+1)*(j+1)
        if n%k==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: 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())

products = []

for i in range(1,10):
    for j in range(1,10):
        products.append(i*j)

if N in products:
    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

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())
for i in range(9):
  if(a%(i+1) ==0 and a/(i+1)<=9):
    print("Yes") 
    exit()
print("No")  

N,K = map(int,input().split())
A=sorted(list(map(int,input().split())))
F=sorted(list(map(int,input().split())),reverse=True)
ok=A[-1]*F[0]
ng=-1
while(ng+1<ok):
  c=ng+(ok-ng)//2
  sum=0
  for i in range(N):
    if(A[i] - c//F[i]>=0):
      sum += A[i] - c//F[i]
  if(sum<=K):
    ok=c
  else:
    ng=c
 
print(ok)

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

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

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

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):
n = 50
ans = 10**12
for i in range(2,int(n**0.5)+1):
    if n%i == 0:
        if (i+n/i)<ans:
            ans = i+n/i
print(int(ans-2))

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):
def calc(A,B):
  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: 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 > 0 and a <= 9) or (b > 0 and b <=9):
	print("{}".a*b)
 else:
	print("-1")
  

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

if (a > 0 and a <= 9) and (b > 0 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):
s = input().split()
output = -1
if (0 < s[0] and s[0] < 10 and 0 < s[1] and s[1] < 10):
  output = s[0]*s[1]
  
return output;

s = input().split()
output = -1
s0 = int(s[0]) 
s1 = int(s[1]) 
if (0 < s0 and s0 < 10 and 0 < s1 and s1 < 10):
  output = s0*s1
  
print(output);

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

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


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

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

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

a,b = map(int, input().split())
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):
import math
n=int(input())
ans=1
for i in reversed(range(2,int(math.sqrt(n)))):
    if n%i==0 and abs(n/ans-ans)>abs(n/i-i):
        ans=n/i
            
print(int(ans-1+n/ans-1))

a,b = list(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 A<10 and B<10 else -1&)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
n = int(input())
ans = {i*j for i in range(1,10) for j in range(1,10)}
if n in ans:
  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().split())
if A >=10 or B >=10:
  print ("-1")
else:
  print (A*B)

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

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

s = input().split() 
 
A=s[0] 
B=s[1] 

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

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

s = input().split()
A = s[0]
B = s[1]

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

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

s = int(input()).split() 
 
A=s[0] 
B=s[1] 

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
N,M,A,B=map(int,input().split())
for m in range(M):
    if N<=A:
        N+=B
    c=int(input())
    N-=c
    if N<0:
        print(m+1)
        break
else:
    print("complete")

N = int(input())
ans = 1 + N - 2 
for i in range(1, int(N**0.5)+1):
    if N%i==0:
        ans = min(ans, i+N//i-2)
print(ans)

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):
l=list(map(int,input().split()))
if !(all[i<=9 for i in l]):
  print (-1)
else:
  print(l[0]*l[1])

l=list(map(int,input().split()))
if !all[i<=9 for i in l]:
  print (-1)
else:
  print(l[0]*l[1])

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

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


Verdicts: Runtime Error

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

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

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

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

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

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):
    if N % i == 0 and N / i <= 9:
        print('Yes')
        exit(0)
print('No')


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

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


Verdicts: Runtime Error

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

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


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


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


Verdicts: Wrong Answer

Runtime Error

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

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

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


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

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

Verdicts: Runtime Error

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

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

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

if 1<=a=<9,1<=b<=9:
  print(a*b)
else:
  pritn("-1")

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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 a<=b<=9 else a*b)

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


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

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

if (1 <= a <= 9) and (1<= b <= 9):
  print("{}".format(a*b))
else:
  print("{}".format(-1))


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

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

x = input().split()

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

if (1 <= a <= 9) and (1<= b <= 9):
  print("{}".format(a*b))
else:
  print("{}".format(-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())
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

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
 
args = sys.argv
x = int(sys.argv[0])
y = int(sys.argv[1])
if x<10 and y<10:
	print(x*y)
else:
	print('-1')

import sys

args = sys.argv
x = int(sys.argv[1])
y = int(sys.argv[2])
if x<10 and y<10:
	print(x*y)
else:
	print('-1')

import sys

args = sys.argv

if(sys.argv[0]<10 && sys.argv[1]<10) {
	print(argv[0]*argv[1])
} else {
	print('-1')
}

import sys
 
input = sys.stdin.readline().split()
result = 1
for n in input:
  n=int(n)
  if result==-1:
    break
  if n<10:
    result = result * n
  else:
    result=-1
print(result)

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


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.readline().rstrip())

    ret = float('inf')
    for i in range(1, 10000000):
        q, mod = divmod(N, i)
        if mod == 0:
            j = N // i
            ret = min(ret, ((j-1)+(i-1)))

    print(ret)


if __name__ == '__main__':
    main()

import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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

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


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

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

Verdicts: Runtime Error

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_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
  
def prod(n):
  result = 1
  for x in n:
    result *= x
  return result
  
a = prime_factorize(n)
b = [a.pop(-1)]

while prod(a) > prod(b):
  prev_result = prod(a) + prod(b)
  b.append(a.pop(0))

  if prev_result < prod(a) + prod(b):
    a.append(b.pop(-1))
    break
  
print(prod(a)-1 +prod(b)-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 = int(input())
if (A < 10) and (B < 10):
  print(A*B)
else:
  print(-1)

A,B = map(int, open(0).read().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 0 <= a <= 9 and 0 <= b <= 0:
  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: 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=input().split()

if len(a)>=2 or len(b)>=2:
  print("-1")
else:
  print(a*b)

a,b=input().split()

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

a,b=input().split()

if len(a)>=2 or len(b)>=2:
  print(-1)
else:
  a=int(a)
  b=int(b)
  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):
str = input()
data = "".split(str)
n1 = int(data[0])
n2 = int(data[1])
if (n1 >9 or n2 > 9):
    print(-1)
else:
    print(n1*n2)

str = input()
data = str.split()
n1 = int(data[0])
n2 = int(data[1])
if (n1 >9 or n2 > 9):
    print(-1)
else:
    print(n1*n2)

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())
n,m=input_list()
#a=input_list()
if n>9 or m>9:
    print(-1)
    exit()

print(n*m)

from collections import Counter 
from collections import defaultdict
from collections import deque
from functools import reduce
import math
import itertools
import heapq
import numpy as np
import bisect
import sys
#import sympy
sys.setrecursionlimit(10**6)


def bfs(s,n,node):
    
    check=[False for _ in range(n)]
    check[s]=True
    
    queue=deque([s])
    visited_num=1

    
    #color_check=[[True for _ in range(l)] for _ in range(n)]
    color=[-1 for _ in range(n)]
    color[s]=0
    
    while visited_num<n:
        
        if len(queue)==0:
            
            
            return color

        now_vertex=queue.popleft()
        
        for next_vertex in node[now_vertex]:


            if check[next_vertex]==True:
                continue

            queue.append(next_vertex)
            check[next_vertex]=True

            
            color[next_vertex]=color[now_vertex]+1
            visited_num+=1

    return color

#n=int(input())z
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
ceil=lambda x,y: (x+y-1)//y
input_list = lambda : list(map(int,input().split()))



#n=int(input())
n,m=input_list()
#a=input_list()
if n>9 or m>9:
    print(-1)
    exit()

print(n*m)

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

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

Verdicts: Runtime Error

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,intpu().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 = int(input())
B = int(input())

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

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

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

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

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

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

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

import collections
import numpy as np
 
# = input()
# = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
#
 
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):
import random

class person():
  def math(self, A, B):
    if A < 10:
      if B < 10:
        result = A*B
      else:
        result = -1
    else:
      result = -1

    return result

takahashi = person()

A = random.randrange(0, 20)
B = random.randrange(0, 20)
result = takahashi.math(A, B)
print(result)


class person():
  def math(self, A, B):
    if A < 10:
      if B < 10:
        result = A*B
      else:
        result = -1
    else:
      result = -1
 
    return result
 
takahashi = person()
A, B = map(int,input().split())
result = takahashi.math(A, B)

def math(A, B):
    if A < 10:
      if B < 10:
        result = A*B
      else:
        result = -1
    else:
      result = -1
    return result
 
A, B = map(int,input().split())
result1 = math(A, B)
print(result1)

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):
N = input().rsplit().split('')
N1 = N[0]
N2 = N[1]

if N1 >=10 or N2 >= 10:
  print(-1)
  
else:
  print(N1 * N2)

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

if a >= 10:
    print(-1)
elif 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):


def prime_factorization(N):
    n=N
    a=2
    prime_factor=[]
    while a**2<=n:
        while n%a==0:
            prime_factor.append(a)
            n//=a
        a+=1
    if n>1:
        prime_factor.append(n)
    return prime_factor


N=int(input())

a=1
b=N//a
dis=abs(b-a)

for i in range(1,int(N**0.5)+1):
    if N%i==0:
        _a=i
        _b=N//i
        _dis=abs(_b-_a)
        if _dis<dis:
            a=_a
            b=_b
            dis=_dis

print(a-1+b-1)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a = int(input())
for i in range (1,10):
    if a % i == 0 and a/i < 10:
        print('Yes')
        exit()

print('No')

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

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)

i = input().split()
if i < 10:
  print(i[0] * i[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):
n = int(input())

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)
a = divisors[-1]
b = divisors[-2]
print(a + b - 2)

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

if 1 <= a <= 9:
    if 1 <= b <= 9:
        print(a * b)
        exit()
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())
kuku = []
for i in range(1,10):
  for j in range(1,10):
    kuku.append(i*j)
if N in kuku:
  print('Yes')
else:
  print('No')

def solve():
    A, B = map(int, input().split())
    if A<10 and B<10:
        return A*B
    return -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):
data = input().split()

if data[0] < 10:
  if data[1] < 10:
    answer = data[0]*data[1]
    
return answer

data = list(map(lambda x: int(x), input().split()))
     
if __name__ == "__main__":
  if data[0] < 10:
    if data[1] < 10:
      answer = data[0]*data[1]
    else:
      answer = -1
  else:
    answer = -1
    
  print(answer)

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

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 len(a) == 1 and len(b) == 1:
  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: 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())

f = 0
for i in range(1,10):
  for j in range(1,10):
    if i*j == N:
      f = 1
      break
  if f == 1:
    break
if f == 0:
  print("NO")
else:
  print("YES")

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

print(a[0]*a[1] if a[0],a[1]<=9 else -1)

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

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

Verdicts: Runtime Error

Runtime Error

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

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


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

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 = sorted(map(int, input().split()))
f = sorted(map(int, input().split()))
time = [f[i] * a[-i-1] for i in range(n)]

sup = max([time[i] - f[i] * k // n for i in range(n)] + [0])
inf = 0
while sup > inf:
  x = (sup + inf) // 2
  train = sum([(max([0, time[i] - x]) + f[i] - 1) // f[i] for i in range(n)])
  if k < train:
    inf = x + 1
  else:
    sup = x
print(sup)


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())
if N%2==0 or N%3==0 or N%5==0 or N%7==0:
    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):
n,m=map(int,input.split())
print(n*m if max(n,m)<10 else -1)

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

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

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


Verdicts: Runtime Error

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

Submission attempts (in order):
def LI():
  return [int(s) for s in input.split()]

A,B = LI()

print(A*B)

def LI():
  return [int(s) for s in input.split()]

A,B = LI()

print(A*B)

def LI():
  return [int(s) for s in input.split()]

A,B = LI()

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

def LI():
  return [int(s) for s in input().split()]

A,B = LI()

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted