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



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



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



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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
n=int(input())
result=1000000000000
for i in range(n):
  nn=n/(i+1)
  if (nn.is_integer() and result>nn+i-1):
    result=nn+i-1
print(result)

n=int(input())
result=100000000000000000000000000
for i in range(n):
  nn=n/(i+1)
  if (nn.is_integer() and result>nn+i-1):
    result=nn+i-1
    print(nn)
    print(i+1)
print(result)

n=int(input())
result=1000000000000
for i in range(n):
  nn=n/(i+1)
  if (nn.is_integer() and result>nn+i-1):
    result=nn+i-1
    print(nn)
    print(i+1)
print(result)

n=int(input())
result=100000000000000000000000000
for i in range(n):
  nn=n/(i+1)
  if (nn.is_integer() and result>nn+i-1):
	result=nn+i-1
print(result)
    
    


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
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: 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):
line = [int(i) for i in input.split()]
v1 = line[0]
v2 = line[1]

if 0 < v1 and v1 < 10 and 0 < v2 and v2 < 10 :
  print(v1*v2)
else:
  print(str(-1))

line = [int(i) for i in input().split(" ")]
v1 = line[0]
v2 = line[1]

if 0 < v1 and v1 < 10 and 0 < v2 and v2 < 10 :
  print(str(v1*v2))
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 0<A and A<10 and 0<B and B<10:
    print(A*B)
else:
    print(-1)


A, B = input().split()

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

A, B = (int(x) for x in input().split())

if 0<A and A<10 and 0<B 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):
import sys
import itertools
import numpy as np

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
def abc(n):
  b = 2
  fct = [0]
  while b * b <= n:
    while n % b == 0:
      n //= b
      fct.append(b)
    b = b + 1
  if n > 1:
    fct.append(n)
  return fct
def getNearestValue(list, num):
  idx = np.abs(np.asarray(list) - num).argmin()
  return list[idx]
for n in range(2,10**12):
  list_ = abc(n)

  list_.sort()
  tmp = np.sqrt(n)
  N = len(list_)

  dp = [[1 for i in range(N+1)] for j in range(N+1)]

  for i in range(N):
    for j in range(1,N):
      if i == j:
          continue
      else:
        if dp[i][j-1] * list_[j] <= tmp:
          dp[i][j] = dp[i][j-1] * list_[j]
        else:
          continue
  tmplist = list(itertools.chain.from_iterable(dp))

  tmp1 = max(tmplist)
  if tmp1 == 0:
    print(n-1)
    sys.exit()
    
    
  tmp2 = make_divisors(n)
  tmp2.sort()
  sq = np.sqrt(n)
  tmpnum = n
  for i in tmp2:
    if i > sq:
      break
    else:
      tmpnum = min(tmpnum-1, n//i + i - 2)
    
  if (tmp1 - 1)+(n//tmp1-1) != tmpnum:
    print(n)

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

Verdicts: Time Limit Exceeded

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

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a,b = map(int.input(),split())
if a <= 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):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())

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

n = int(input())
all = set([i * j for i range(1, 10) for j range(1, 10)])
if n in all:
  print("Yes")
else:
  print("No")

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

if a <= 9 and b <= 9:
  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):
N = int(input())
kuku= [1, 2, 3, 4, 5, 6, 7, 8, 9]
c = 0

for a in kuku:
    for b in kuku:
        if a*b == N:
            c+=1
if c>=1:
    print('Yes')
else:
    print('No')

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a=int(input())
b=int(input())
if a>9 or b>9:
    print(-1)
print(a*b)

def kuku(a,b):
   if a>9 or b>9:
        return(-1)
   return(a*b)



def kuku(a,b):
    if a<=9 and b<=9:
        return a*b
    return -1

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

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

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

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

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

def xx(y):
  aHeight = a*math.sin(y)
  bHeight = b*math.sin(0.5*math.pi-y)
  if aHeight < bHeight:
    menseki = 0.5*a*b + (bHeight/aHeight*a-b)*math.sin(0.5*math.pi-y)*(a/math.cos(y))
  else:
    aD = bHeight/math.sin(y)
    menseki = 0.5*aD*b
  return menseki

minY = 0
maxY = 0.5*math.pi
while True:
  menseki = xx((minY+maxY)/2)
  if abs(x/a - menseki) < 0.1:
    print((minY+maxY)/2 * (180/math.pi))
    break
  elif menseki < x/a:
    maxY = (minY+maxY)/2
  else:
    minY = (minY+maxY)/2

import math
N = int(input())
sqN = int(math.sqrt(N))
for i in range(sqN):
  if N % (sqN-i) == 0:
    print(int(N/(sqN-i)+sqN-i))
    break

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 = 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
sys.setrecursionlimit(4100000)
import heapq
n, k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
f = [int(i) for i in input().split()]
a.sort()
f.sort(reverse=True)

if sum(a) <= k:
    print(0)
else:
    heap = []
    for i in range(n):
        heapq.heappush(heap, (-a[i]*f[i], a[i], f[i]))
    for i in range(k):
        cur,x,y = heapq.heappop(heap)
        x -= 1
        cur = x*y
        heapq.heappush(heap,(-cur,x,y))
    ans = -float('inf')
    for i in range(len(heap)):
        ans = max(-heap[i][0], ans)
    print(ans)

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

print(ans)
    

import sys

a, b = map(int, sys.stdin.readline().split())

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

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):
num = int(input())
Flag = False
for x in range(2,10):
    for y in range(x,10):
        print("x"+str(x)+":y"+str(y))
        if x * y == num:
            Flag = True
            break
    if Flag == True:
        break

if Flag:
    print("Yes")
else:
    print("No")


num = int(input())
Flag = True
for x in range(2,10):
  if num % x == 0:
    Flag = False
    break
if flag:
  print("NO")
else:
  print("YES")


num = int(input())
Flag = False
for x in range(1,10):
    for y in range(x,10):
        if x * y == num:
            Flag = True
            break
    if Flag == True:
        break

if Flag:
    print("Yes")
else:
    print("No")


"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") 

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
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(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):
a=input()
b=input()
if(0<=a<=9 and 0<=b<=9):
  print(a*b)
else:
  print(-1)
  


a,b = list(map(int, input().split()))
  
if(1<=a<=9 & 1<=b<=9):
    print(a*b)

else:
    print(-1)
  
  
  


a,b = list(map(int, input().split()))
  
if(0<=a<=9 & 0<=b<=9):
    print(a*b)

else:
    print(-1)
  
  
  

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

a=int(input())

b=int(input())

if(0<=a<=9 & 0<=b<=9):
    print(a*b)

else:
    print(-1)
  
  
  


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

else:
    print(-1)
  
  
  

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

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

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

Verdicts: Runtime Error

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

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


a,b=map(int,input().split())
if max(a,b)>9:
  print('-1')
else:
  print(a＊b)

a,b=map(int,input().split())
if max(a,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())
a=0
for i in range (2,10):
  if N%i==0:
    if N/i<=9:
      a=a+1
if (a==0 and N>1):
  print("No")
else:
    print("Yes")

N=int(input())
a=0
for i in range (2,10):
  if N%i==0:
    if N/i<=9:
      a=a+1
if (a==0 and N>1):
  print("No")
else:
    print("Yes")


N=int(input())
a=0
for i in range (2,10):
  if N%i==0:
    if N/i<=9:
      a=a+1
if (a==0 and N>1):
  print("No")
else:
    print("Yes")

N=int(input())
a=0
for i in range (2,10):
  if N%i==0:
    if N/i<=9:
      a=a+1
if (a==0 and N>1):
  print("no")
else:
    print("yes")
print(a)
    

a=int(input())
b=int(a**(1/2))
m=a
for i in range (2,b+1):
  if a%i==0:
    m=i
c=a/m
print(int(m+c-2))

N=int(input())
a=0
for i in range (2,9):
  if N%i==0:
    if N/i<=9:
      a=a+1
if a==0 and N>1:
  print("no")
else:
    print("yes")

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

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 = 0
flg = False

for i in range(10)[1:]:
  ans = n/i
  r = n%i
  if(ans<10 and r ==0):
    flg = True
    break
if(flg):
    print("Yes")
else:
    print("No")

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

Verdicts: Runtime Error

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

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

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

for i in range(1, 10):
    if n % i == 0 and n / i < 10:
        print('Yes')
        break

else:
    print('No')

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

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

def quick_sort(arr):
    left = []
    right = []
    if len(arr) <= 1:
        return arr

    
    # ref = random.choice(arr)
    ref = arr[0]
    ref_count = 0

    for ele in arr:
        if ele < ref:
            left.append(ele)
        elif ele > ref:
            right.append(ele)
        else:
            ref_count += 1
    left = quick_sort(left)
    right = quick_sort(right)
    return left + [ref] * ref_count + right

def costsum(x,y):
    siguma =0
    Asort = quick_sort(x)
    Fsort = quick_sort(y)
    for i in range(N):
        siguma = siguma + Asort[i]*Fsort[N-i-1]
    return siguma
def maxseki(x,y):
    seki = 0
    count = 0
    Asort = quick_sort(x)
    Fsort = quick_sort(y)
    for i in range(N):
        if seki < Asort[i]*Fsort[N-i-1]:
            seki = Asort[i]*Fsort[N-i-1]
            count = i
    return count

input1 = input()
input2 = input()
input3 = input()

hairetu1 = input1.split()
hairetu2 = input2.split()
hairetu3 = input3.split()
N = int(hairetu1[0])
K = int(hairetu1[1])
A = [int(s) for s in hairetu2] 
F = [int(t) for t in hairetu3]

Asort = quick_sort(A)
Fsort = quick_sort(F)

for i in range(K):
    s=maxseki(Asort,Fsort)
    Asort[s]=Asort[s]-1


P = maxseki(Asort,Fsort)
maxcost = Asort[P]*Fsort[N-P-1]
if maxcost < 0:
    maxcost =0
print (maxcost)


    

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

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

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


Verdicts: Wrong Answer

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

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

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):
string=input

string=string.split(' ')
A= int(A[0])
B= int(A[1])

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



string=input

string=string.split(' ')
A= int(A[0])
B= int(A[1])

if A in range(1,10):
else:
    print(-1) break
if B in range(1,10):
else:
    print(-1 break)
print(A*B)

string=input

string=string.split(' ')
A= int(A[0])
B= int(A[1])

if A in range(1,10):
else:
    print(-1) break
if B in range(1,10):
else:
    print(-1) break
print(A*B)

string=input

string=string.split(' ')
A= int(A[0])
B= int(A[1])

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




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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b = map(int, input().split())
if a<=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: 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())
flag = 0

for i in range(1,10):
    for j in range(1,10):
        if i*j == n:
            flag = 1

if flag == 1:
    print("Yes")
else:
    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):
# coding: utf-8
# Your code here!
x=input()
y=input()

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

# coding: utf-8
# Your code here!
x,y=input().split()

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

Verdicts: Runtime Error

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

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

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

Verdicts: Runtime Error

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

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

A,B = map(int,input().split())
if 1 <= A and A <= 9 :
    if 1 <= B and 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):
a,b=list(map(input().split()))
if a>9 or b>9:
  print("-1")
else:
  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):
nums = [int(e) for e in input().split()]

if nums[0] <= 9 & nums[1] <= 9:
  print(nums[0]*nums[1])
else:
  print(-1)

nums = [int(e) for e in input().split()]

if (nums[0] <= 9) & (nums[1] <= 9):
  print(nums[0]*nums[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):
A = int(input())
B = int(input())

if 1 <= A <= 20 and 1 <= B <= 20 :
    print(A * B)

else :
    print(-1)

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

if 1 <= A <= 20 and 1 <= B <= 20 :
    print(A * B)

else :
    print(-1)

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

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

else :
    print(-1)

A = input()
B = input()

if 1 <= A <= 20 & 1 <= B <= 20 :
    print(A * B)

else :
    print(-1)

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

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

else :
    print(-1)

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

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

else :
    print(-1)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

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

if L <=10 or R <= 10:
    print(-1)
else:
    print(L*R)

L,R = map(int,input().split())

if L <=10 or R <= 10 or L > 1 or R > 1:
    print(-1)
else:
    print(L*R)

L,R = map(int,input().split())

if L >= 10 or R >= 10 or L < 1 or R < 1:
    print(-1)
else:
    print(L*R)

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

for i in range(1, 10):
    for j in range(1, 10):
        if i * j == N:
            break
    if i * j == N:
        print("Yes")
        break
    elif i == 9 and i * j != N:
        print("No")

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

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

N = int(input())
 
for i in range(1,10):
  for j in range(1,10):
    if i*j==N:
      break
  if i*j==N:
    print("Yes")
    break
  elif i==9 and i*j!=N:
    print("No")

N = int(input())
 
for i in range(1,10):
  for j in range(1,10):
    if i*j=N:
      break
  if i*j=N:
    print("Yes")
    break
  elif i==9 and i*j!=N:
    print("No")

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

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):
ab = input()
a, b = ab.split(" ")
A = int(a)
B = int(b)

if "0" in a or "0" in b or a > 9 or b > 9:
    print(-1)
else:
    print(A * B)

ab = inpout()
a, b = ab.split("")
A = int(a)
B = int(b)

if "0" in a or "0" in b:
	print(-1)
else
	print(A * B)

ab = inpout()
a, b = ab.split("")
A = int(a)
B = int(b)

if "0" in a or "0" in b:
	print(-1)
else:
	print(A * B)

ab = input()
a, b = ab.split(" ")
A = int(a)
B = int(b)

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

n=int(input())
if(n>81):
    print("No")
else:
    c2=0
    c3=0
    c5=0
    c7=0
    while(n%2==0):
        c2+=1
        n=n/2
    while(n%3==0):
        c3+=1
        n=n/3
    while(n%5==0):
        c5+=1
        n=n/5
    while(n%7==0):
        c7+=1
        n=n/7
    if(n!=1):
        print("No")
    else:
        if(c5==2 and c2==0 and c3==0 and c7==0):
            print("Yes")
        elif(c5==1 and c7==1 and c2==1):
            print("No")
        elif(c5<2):
            print("Yes")
        else:
            print("No")

n=int(input())
if(n>81):
    print("No")
else:
    c2=0
    c3=0
    c5=0
    c7=0
    while(n%2==0):
        c2+=1
        n=n/2
    while(n%3==0):
        c3+=1
        n=n/3
    while(n%5==0):
        c5+=1
        n=n/5
    while(n%7==0):
        c7+=1
        n=n/7
    if(n!=1):
        print("No")
    else:
        if(c5==2 and c2==0 and c3==0 and c7==0):
            print("Yes")
        elif(c5<2):
            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

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 = list(input())
if len(S) > 3:
    print(int(S[0]) * int(S[1]))
else:
    print(-1)


S = list(input())
if len(S) > 3:
    print(int(S[0]) * int(S[-1]))
else:
    print(-1)


S = list(input())
if len(S) < 4:
    print(int(S[0]) * int(S[-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 = zip(int(),input().split())
if A<10 && B<10:
  ans = A * B
else:
  ans = -1
print(ans)

A,B = map(int,input().split())
if A<10 and B<10:
  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,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):
import math
a, b, x = map(int, input().split())
 
h = x / (a * a) #height 
if h > b / 2:
  shahen = 4 * (b - x/(a * a) * (b - x/(a * a))) + a * a
  sin = a / (math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))
elif h == b / 2:
  print(45.0000000000)
else:
  shahen = 4 * x * x + (a * a * a * a) * b * b
  sin = 2 * x / (math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))


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

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

# coding: utf-8
# Your code here!

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

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

a,b = random.randint(1, 20)
if a+b <= 18:
  print(a*b)
  else:
    print(-1)

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

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

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

a, b = input()

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


n=int(input())
a=[]
for x in range(1,10):
  for y in range(1,10):
    a=a.append(x*y)
if n in a:
  print('Yes')
else:
  print('No')


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

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


Verdicts: Runtime Error

Runtime Error

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*B >= 81 else -1)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A,B = map(int,input().split())
if(A < 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: 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):
while True:
    try:
        a = int(input())
        b = int(input())
    except EOFError:
        break
    if a <= 9 and b <= 9:
        print(a * b)
    else:
        print(-1)


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

x=a*b
c=0
for i in range(1,10):
    for j in range(1,10):
        
        if (j*i==x):
            c=c+1
if (c==0):
    print('-1')
if (c!=0):
    print(c)


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


def mult(a, b):
    if a > 9 or b > 9 or a < 1 or b < 1:
        print(-1)
    else:
        print(a * b)

mult(a,b)

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

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

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

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

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

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

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

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
import math
import sys

n = int(input())

l = []
if n == 2:
    print(1)
    sys.exit()
else:
    for i in range(2, int(math.sqrt(n) + 1)):
        if n % i == 0:
            for i in range(1, int(math.sqrt(n)) + 1):
                if n % i == 0:
                    j = n // i
                    l.append(i + j)
            print(min(l) - 2)
            sys.exit()
print(n -1)

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

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

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

a, b = map(int, input().split())
if a and b = 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9:
  print(a * b)
else:
  print('-1')

a, b = map(int, input().split())
c = [1,2,3,4,5,6,7,8,9]
if a in c and b in c:
  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):
r = int(input())

print(r ** 2)

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):
N = int(input())
flg = 'No'
for i in range(1,10):
  for j in range(1, 10):
    if N == i*j:
      flg = 'Yes'
print(flg)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a=int(input())
for x in range(int(a**0.5),0,-1):
	if a%x==0:
     d=int(a//x)
     s=d+x-2
     break
print(s)

a=int(input())
for x in range(int(a**0.5),0,-1)
	if a%x==0:
    s=a+x-2
    break
print(s)

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):
import math
a,b,x = map(int,input().split())
h = x/(a**2)
if b//2 >= h:

    d = 2*h*a/b

    sin = math.degrees(math.acos(d/((d**2+b**2)**0.5)))
    print(sin)
else:
    d = 2*(b-h)*a/a
    sin = math.degrees(math.acos(d/((d**2+a**2)**0.5)))
    print(90-sin)


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

Verdicts: Runtime Error

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

Submission attempts (in order):
a , b = list(map(int, input().split()))
if a 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: Wrong Answer

Accepted