Problem:


Score : 100 points

Problem Statement

Compute A \times B.

Constraints

1 \leq A \leq 100

1 \leq B \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

Print the value A \times B as an integer.

Sample Input 1

2 5

Sample Output 1

10

We have 2 \times 5 = 10.

Sample Input 2

100 100

Sample Output 2

10000



Sample input:
2 5


Sample output:
10

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0
aaa = 2
maxi = 2
def prime(aaa):
    if n != 1:
        i = 2
        while i*i <= aaa:
            if aaa % i == 0:
                return False
            i += 1
        return True
    else:
        return False
def make_divisors(n):
    if prime(n):
        return True
    a = 0
    i = 2
    while i <= n:
        if n % i == 0:
            if a == 0:
                a = i
                n /= i
                i -= 1
                if n == 1:
                    return True
            elif a == i:
                n /= i
                i -= 1
                if n == 1:
                    return True
                pass
            else:
                return False
        i += 1
    return True
def divisors(a, i):
    global ans, aaa, maxi
    while i <= n and i <= a:
        if prime(a) and i * i <= a:
            ans += 1
            break
        if a % i == 0:
            if make_divisors(i):
                ans += 1
                num = a / i
                aaa = num
                if maxi <= i:
                    maxi = i
                divisors(num, i+1)
                break
        i += 1
if n == 1:
    print(0)
else:
    if prime(n):
        print(1)
    else:
        divisors(n, 2)
        print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
a = (int(x) for x in input().split())
number =1

for i in a:
    if i==0:
        print(0)
        exit(0)
    number *= i
    if number>10**18:
            print(-1)
            exit(0)

print(number)

Submission status: Runtime Error

Solution code:
import math
n = int(input())

count = 0

def sosu(n,z):
    for i in range(z, int(math.sqrt(n))+1):
        if n%i == 0:
            return i
            break
    return -1

if sosu(n,2) == -1 and n != 1:
    print(1)
    exit()

ans  = 0
z = 2

def hantei(n):
    i = sosu(n,2)
    s = 0
    if sosu(n,2) == -1:
        return True
    if sosu(n,2) > 0:
        s = n ** (1/i)
        if int(s) == math.floor(s):
            #print(n,s)
            return True
        else:
            return False

memo = []

while(n != 1) :
    ans = sosu(n,z)
    print(n,ans,z)
    if ans == -1:
        if memo.count(n) == 0 and hantei(n):
            count +=1
            break
        else:
            break

    if hantei(ans) :
        memo.append(ans)
        z = ans+1
        n = n//ans
        count += 1
    else:
        z = ans +1
    #print(count)



print(count)

Submission status: Runtime Error

Solution code:
import math
n = int(input())

count = 0

def sosu(n,z):
    for i in range(z, int(math.sqrt(n))+1):
        if n%i == 0:
            return i
            break
    return -1

if sosu(n,2) == -1 and n != 1:
    print(1)
    exit()

ans  = 0
z = 2

def hantei(n):
    i = sosu(n,2)
    s = 0
    if sosu(n,2) == -1:
        return True
    if sosu(n,2) > 0:
        s = n ** (1/i)
        if int(s) == math.floor(s):
            print(n,s)
            return True
        else:
            return False

memo = []

while(n != 1) :
    ans = sosu(n,z)
    print(n,ans,z)
    if ans == -1:
        if memo.count(n) == 0 and hantei(n):
            count +=1
            break
        else:
            break

    if hantei(ans) :
        memo.append(ans)
        z = ans+1
        n = n//ans
        count += 1
    else:
        z = ans +1
    #print(count)



print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int,input().split()))

ans = 1
 
for i in A:
    ans *= i
    if ans > 10**18:
        ans = -1
        break
print(ans)

Submission status: Runtime Error

Solution code:
import heapq as hp
n = int(input())
if n%2 ==0:
    m = n//2 + 1
else:
    m = (n+1) //2
a,b = [],[]
for i in range(0,n):
    c = list(map(int, input().split()))
    a.append(c[0])
    b.append(c[1])
la = hp.nlargest(m,a)
lb = hp.nlargest(m,b)
if n%2 == 0:
    c = la[-1] + la[-2] 
    d = lb[-1] + lb[-2] 
    print(d-c+1)
else:
    print(lb[-1]-la[-1]+1)

Submission status: Runtime Error

Solution code:
input()
a = list(map(int, input().split()))
a.sort()
b = 1
for i in a:
    b *= i
    if b > 1e18:
        print(-1)
        exit()
print(b)

Submission status: Runtime Error

Solution code:
listed = input().split()
listed = [int(x) for x in listed]

mul = 1

for num in listed:
  if num == 0:
    mul = 0
    break
  if mul != -1:
    mul *= num
    if mul > 10:
      mul = -1
  return mul

print(mul)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
A.sort()
B=1
for i in A:
  B=i*B
  if(B>10**18):
    B=-1
    break
print(B)

Submission status: Runtime Error

Solution code:
import numpy as np
 
N = int(input())
A = list(map(np.int64, input().split()))
 
A = np.array(A)
 
ans = np.prod(A)
 
 
if ans >10**18:
  print(-1)
else:
  print(ans)

Submission status: Runtime Error

Solution code:
A,B = map(int,input())
print('A*B')

Submission status: Runtime Error

Solution code:
import math as m
a,b=list(map(float,input().split()))
print(m.floor(a*(b*10**5)/10**5)

Submission status: Runtime Error

Solution code:
A, B = input().split()


A = int(A)
x = int(B[0]) * 100
y = int(B[1]) * 10
z = int(B[2]) * 1

C = x + y + z

print((A * C) // 100)

Submission status: Runtime Error

Solution code:
a,b=map(in,input().split())
print(a*b)

Submission status: Runtime Error

Solution code:
# import inbuilt standard input output  
from sys import stdin, stdout  
  
# suppose a function called main() and 
# all the operations are performed 
def main(): 
  
    # input via readline method
    n,b=raw_input().split()
    n, b = [int(n), float(b)]
    # array input similar method 
    c=n*b
    print(int(c))
  
# call the main method 
if __name__ == "__main__": 
    main()

Submission status: Runtime Error

Solution code:
a,b=input().split()
A=int(a)
B=float(b)
x=a*b//1
print(x)

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
ans=1
if min(A)==0:
    ans=0
else:
    for a in A:
        ans=ans*a
    if ans > 10**18:
        ans = -1
print(ans)

Submission status: Runtime Error

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt, gcd
from copy import deepcopy


def main():
    n = int(input())
    a_list = tuple(map(int, input().split()))
    num = 1000000000000000000
    ans = 1
    for i in range(n):
        ans *= a_list[i]
    
    if ans <= num:
        print(ans)
    else:
        print(-1)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
A,B = int(input())
print("A*B")

Submission status: Runtime Error

Solution code:
import numpy

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

val = numpy.prod(A)

if val > 10**18:
    print('-1')
else:
    print(val)

Submission status: Runtime Error

Solution code:
print(a*b);

Submission status: Runtime Error

Solution code:
n=int(input())
arr=list(map(int,input().split()))
pro=1;
ans=True;
for i in range(n):
    pro*=arr[i]
    if pro>1000000000000000000 :
        ans=False
        break
    
    
if ans==False and arr.count(0)==0:
	print("-1")
else:
    print(pro)

Submission status: Runtime Error

Solution code:
n=int(input())
l=map(int,input().split(' '))
s=1
if 0 in l:
    s=0
else:
    
    for i in l:
        s=s*i
if s>10**18:
  print("-1")
else:
  print(s)

Submission status: Runtime Error

Solution code:
import numpy as np
n = int(input())
li = list(map(int, input().split()))

ans = np.prod(li)
print(ans) if ans <= 10**18) else print(-1)

Submission status: Runtime Error

Solution code:
#coding:utf-8

a, b=map(int,input().split())
c=a:b
print(c)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
r=1
for n in A:
    r=r*n
print(-1 if r>10**18 else r)

Submission status: Runtime Error

Solution code:
import itertools
N,S = map(int,input().split( ))
A = list(map(int,input().split( )))
a = [i for i in range(N)]
C = []
for i in range(1,N+1):
    C += list(itertools.combinations(a,i))
ans = 0
for c in C:
    wa = 0
    for i in c:
        wa += A[i]
    if wa == S:
        for cc in C:
            if set(c) <= set(cc):
                ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
from operator import mul
from functools import reduce
N = int(input().strip())
A = list(map(int,input().split()))
x = reduce(mul, A)
if x > 1000000000000000000:
    print("-1")
else:
    print(x)

Submission status: Runtime Error

Solution code:
N=int(input())
Nk=N
rootN=int(N**0.5)
p=[1]*(rootN+1)
p[0]=0
p[1]=0
for i in range(2,rootN+1):
    for j in range(i*2,rootN,i):
        p[j]=0
ps=[i for i in range(1,rootN+1) if p[i]==1]
pq=[]
for i in ps:
    d=i
    c=0
    for j in range(1,10):
        if (N/i).is_integer():
            c+=1
            N/=(i)
        else:
            break
        d*=i
    if c!=0:
        pq.append(c)

res=0
for j in pq:
    res+=int(((8*j+1)**0.5-1)/2)


if N > rootN:
    res+=1
if N==Nk:
    res+=1
    
print(res)

Submission status: Runtime Error

Solution code:
import sys
n = int(sys.stdin.readline())
a = list(map(int, sys.stdin.readline().split()))
x = 1
for i in range(n):
  x *= a[i] 
if x > 1000000000000000000:
  x = -1
print(x)

Submission status: Runtime Error

Solution code:
N=int(input())
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
a=0
T=factorization(N)
l=len(T)
for i in range(l):
    if T[i][1]<3:
        a+=1

    elif T[i][1]<6:
        a+=2
    elif T[i][1]<10:
        a+=3
    elif T[i][1]<15:
        a+=4
    elif T[i][1]<21:
        a+=5
    elif T[i][1]<28:
        a+=6
    elif T[i][1]<36:
        a+=7
    elif T[i][1]<45:
        a+=8
    elif T[i][1]<55:
        a+=9
    elif T[i][1]<66:
        a+=10
print(a)

Submission status: Runtime Error

Solution code:
N=int(input())
L=list(map(int,input().split()))
a=1
for i in range(N):
  a=a*L[i]
if a>10**18:
  print(-1)
else:
  print(a)

Submission status: Runtime Error

Solution code:
n=input()
ans=1
for i in range(n):
  a=input()
  ans=ans*a
if(ans>pow(10,18)):
  print(-1)
else:
  print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np;
from numba import jit
import warnings
from operator import mul
from functools import reduce
warnings.simplefilter('ignore')
    

if __name__ == '__main__':
    try:

        N = int(input())
        A = list(map(int, input().split()))
        ans = reduce(mul, A)
        if ans > 10 ** 18:
            print(-1)
        else:
            print(ans)
    except:
        if 0 in A:
            print(0)
        else:
            print(-1

Submission status: Runtime Error

Solution code:
N = int(input())
M=N
ans=0

for i in range(2,int(N**(1/4))+1):
    e=1
    while N%(i**e)==0:
        N=N//(i**e)
        ans+=1
        e+=1
    if N<i:
        break
if M==1:
    ans=0
elif ans==0:
#    x = int(N**(1/5))
    y = int(N**(1/4))
    z = int(N**(1/3))
    a = int(N**(1/2))
#    if x**5==M:
#        ans = 2
    if y**4==M:
        ans = 2
    elif z**3==M:
        ans = 2
    elif a**2==M:
        ans = 1
    else:
        ans=1
print(ans)

Submission status: Runtime Error

Solution code:
import sys

n= int(input())
a = list(map(int,input().split()))
ans = a[0]
ans_max = 10 ** 18

for i in range(1, n):
    ans *= a[i]
    if ans > ans_max:
        print("-1")
        sys.exit()

print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np;
from numba import jit
import warnings
from operator import mul
from functools import reduce
warnings.simplefilter('ignore')
    

if __name__ == '__main__':
    try:

        N = int(input())
        A = list(map(int, input().split()))
        ans = reduce(mul, A)
        if ans > 10 ** 18:
            print(-1)
        else:
            print(ans)
    except:
        print(-1)

Submission status: Runtime Error

Solution code:
import numpy as np;
from numba import jit
import warnings
from operator import mul
from functools import reduce
warnings.simplefilter('ignore')
    

if __name__ == '__main__':
    try:

        N = int(input())
        A = list(map(int, input().split()))
        ans = reduce(mul, A)
        if ans > 10 ** 18:
        print(-1)
        else:
            print(ans)
    except:
        print(-1)

Submission status: Runtime Error

Solution code:
n=int(input())
a=input().split()
a=list(map(int,a))
i=0
ans=1
for calc in a:
    if(0 in a==True):
        print(0)
        exit()
    ans=ans*calc
    if(ans>1000000000000000000):
        print(-1)
        exit()
    i+=1
    if(i==n):
        break
if(ans>1000000000000000000):
    print(-1)
else:
    print(ans)

Submission status: Runtime Error

Solution code:
import functools
import operator

N = int(input())
A = list(map(int,input().split()))
result = functools.reduce(operator.mul, A)
if '0' in A :
    print(0)
else :
    if result > 10**18 :
        print('-1')
    else :
        print(result)

Submission status: Runtime Error

Solution code:
import numpy as np;
from numba import jit
import warnings
from operator import mul
from functools import reduce
warnings.simplefilter('ignore')
    

if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split()))
    ans = reduce(mul, A)
    if ans > 10 ** 18:
        print(-1)
    else:
        print(ans)

Submission status: Runtime Error

Solution code:
import functools
import operator

N = int(input())
A = list(map(int,input().split()))
result = functools.reduce(operator.mul, A)
if 0 in A :
    print(0)
else :
    if result > 10**18 :
        print('-1')
    else :
        print(result)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int,input().split()))
#res = A[0]
for i in range(1,N): 
	A[0] *= A[i]
if A[0] <= 10**18:
	print(A[0])
else:
	print("-1")

Submission status: Runtime Error

Solution code:
import math

n = int(input())

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

if is_prime(n):
    print(1)
else:
    count = 0
    nums = []
    while n != 1:
        for i in range(2, 10*12):
            v, m = divmod(n, i)
            if m == 0:
                if i in nums:
                    continue

                nums.append(i)
                n = v
                count += 1
            else:
                pass

    print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
li = list(map(int,input().split()))
a = 1
for i in range(n):
  a *= li[i]
if a > 10**18:
  print("-1")
else:
  print(a)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int,input().split()))
for i in range(1,N): 
	A[0] *= A[i]
if A[0] < 10**18:
	print(A[0])
else:
	print("-1")

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c= a*b
print(c)

Submission status: Runtime Error

Solution code:
A,B = map(input())
print(A*B)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = int(1)
for number in A:
  ans *= number
if ans <= 1000000000000000000:
  print(int(ans))  
else:
  print('-1')

Submission status: Runtime Error

Solution code:
from sys import stdin
input =stdin.readline
a=1
lst = [] 
n = int(input()) 
lst=list(map(int,input().strip().split()))
  
for i in lst:
    if (i==0):
        print(0)
        break
    a*=i;
    if(a>1000000000000000000):
        print(-1)
        break
if(a<=1000000000000000000):
    print(a)

Submission status: Runtime Error

Solution code:
A,B = int(input().split())
print(AxB)

Submission status: Runtime Error

Solution code:
n=int(input()) 
alist=list(map(int,input().split()))
a=1
if 0 in alist:
    print("0")
else:
    for i in alist:
        if a<=10**18:
            a=a*i
        else:
            break
    if a>10**18:
        print('-1')
    else:
        print(a)

Submission status: Runtime Error

Solution code:
N=int(input())
P=list(map(int,input().split()))
import numpy
Q=numpy.array(P)
 
result =numpy.prod(Q)
 
if result>pow(10, 18):
    print('-1')
else:
    print(str(result))

Submission status: Runtime Error

Solution code:
input_number = int(input())
int_list = list(map(int, input().split()))

check = 10 ** 18
ans = int_list[0]
for i in int_list[1:]:
    ans = ans * i

    if ans > check:
        ans = -1
        break

for i in int_list:
    if i == 0:
        ans = 0
        break

print(ans)

Submission status: Runtime Error

Solution code:
a = input()
A = int(a)
b = input()
B = int(b)
c = A * B
print(c)

Submission status: Runtime Error

Solution code:
A, B = input.trim().split()
C = int(A) * float(B)
D = C // 1
print(round(C))

Submission status: Runtime Error

Solution code:
N = int(input())
primeNum = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999]

pow = 1
time = 0
while True:
    for p in primeNum:
        z = p**pow
        if p <= N:
            if N % z == 0:
                N = int(N / (z))
                time+=1
        else:
            break
    pow+=1
    if pow >= N:
        break

print(time)

Submission status: Runtime Error

Solution code:
a = input("A")
A = int(a)
b = input("B")
B = int(b)
c = A * B
print(c)

Submission status: Runtime Error

Solution code:
import numpy as np

def seachPrimeNum2(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    primeNum2 = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    for i in range(1,8):
      for j in primeNum:
        primeNum2.append(j**i)
    return primeNum2
def seachPrimeNum3(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    primeNum2 = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    for i in range(1,5):
      for j in primeNum:
        primeNum2.append(j**i)
    return primeNum2
def seachPrimeNum4(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    primeNum2 = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    for i in range(1,4):
      for j in primeNum:
        primeNum2.append(j**i)
    return primeNum2
P = seachPrimeNum2(1000)
P += seachPrimeNum3(10000)
P = set(P+seachPrimeNum4(1000000))
N = int(input())
ans = 0
for p in P:
  if N%p == 0:
    ans += 1
    N = N//p
  if N == 1:
    print(ans)
    exit()
print(max(1,ans))

Submission status: Runtime Error

Solution code:
from operator import mul
from functools import reduce

n = int(input().rstrip())
nums = map(int,input().rstrip().split(' '))

ans = reduce(mul, nums)

if ans > 1000000000000000000:
    print(-1)
else:
    print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
 
pn=[2];A=100000
for L in range(3,A):
    chk=True
    for L2 in pn:
        if L%L2 == 0:chk=False
    if chk==True:pn.append(L)
        
A246655 = []
for p in pn:
    pe = p
    while pe < A:
        A246655.append(pe)
        pe *= p
A246655 = sorted(A246655)
 
c=0
for i in range(len(A246655)):
    if N%A246655[i]==0:
        N = N//A246655[i]
        c+=1
print(c)

Submission status: Runtime Error

Solution code:
def mul(a,b):
  return a*b

if __name__ == "__main__":
  a = int(input())
  b = int(input())
  print(mul(a,b))

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
A = [int(i) for i in input().split()]
a = np.array(A)
sum = np.prod(a)

if  sum > 1000000000000000000:
    print(-1)
else:
    print(sum)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
c = int(1)
N = int(input())
A = [int(x) for x in input().split()]
for k in range(N):
    c*=A[k]
if c>10**18:
    print(-1)
else:
    print(c)

Submission status: Runtime Error

Solution code:
a=int(input())
b=list(map(int,input().split()))
print(b)
c=1
for i in range(a):
  c=c*b[i]
if(c>1000000000000000000):
  print(-1)
else:
  print(c)

Submission status: Runtime Error

Solution code:
a=int(input())
b=list(map(int,input().split()))
c=1
for i in range(a):
  c=c*b[i]
if(c>1000000000000000000):
  print(-1)
else:
  print(c)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = 1
for number in A:
  ans *= number
if ans <= 1000000000000000000:
  print(ans)
else:
  print('-1')

Submission status: Runtime Error

Solution code:
number = input().split(" ")
a = int(number[0])
b = int(number[1])

result = 0

con1 = a >= 1 and a<= 100
con2 = b >= 1 and b <= 100
if con1 == True and con2 == True:
  	result = a*b
    print(result)
else 
	print()

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
  a = int(input())
  b = int(input())
  print(a*b)

Submission status: Runtime Error

Solution code:
import numpy as np
from numpy.compat import long

n = int(input())
a = list(map(long ,input().split()))
p = np.prod(a)

if len(str(p))>=19:
    print("-1")
else:
    print(p)

Submission status: Runtime Error

Solution code:
import math

def using_sqrt(limit,elm):
    n = 0
    if limit < 2:
        return 0

    elm.append(2)

    for k in range(3, limit+1,2):
        factor = 0

        # 2以外の偶数は素数ではないので無視する
        if k % 2 == 0 and k != 2:
            continue

        # 繰り返しの上限を対象の平方根にする
        for divisor in range(2, math.floor(math.sqrt(k))+1):
            if k % divisor == 0:
                factor += 1

        if factor == 0:
            elm.append(k)
            n += 1

    return n


N = int(input())
A = []

using_sqrt(N,A)

A_len=len(A)

for i in range(A_len):
    chk = A[i]
    while True:
        chk *= A[i]
        if chk <= N:
            A.append(chk)
        else:
            break

A.sort()

A_len=len(A)
cnt = 0
chk_N = N
for i in range(A_len):
    if chk_N % A[i] == 0:
        chk_N = int(chk_N / A[i])
        cnt += 1
        
    if chk_N == 1:
        break

print(cnt)

Submission status: Runtime Error

Solution code:
import math
a, b = map(double, input().split())
c = int(math.floor(a * b))
print(c)

Submission status: Runtime Error

Solution code:
N=int(input())
P=[list(map(int,input().split()))]
from functools import reduce
from operator import add, mul
result =reduce(mul, P[0])

if result>10**18:
    print(-1)
else:
    print(result)

Submission status: Runtime Error

Solution code:

n=input()
nums=list(map(int,input().split()))

ans = 1
over = 10**18

for num in nums:
    ans = ans * num
    if ans > over:
        print(-1)
        exit()

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())

Alist = []
A = input()
A = A.split()
for a in A:
    Alist.append(int(a))

def program():
    ans = 1
    for a in Alist:
        ans *= a
        if ans > 10**18:
            return -1
    return ans

print(program())

Submission status: Runtime Error

Solution code:
sute = input()
input_nums = input().split()

output = 1

x = map((lambda x: int(x)), input_nums)


for num in x:
    output *= num   
    if output > 10^18:
        output = -1

if output <= -1:
    output = -1


print(output)

Submission status: Runtime Error

Solution code:
    a,b = int,input().split()
     
    c = float(b)
     
    x = a*c
     
    print(math.floor(x))

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C = A*B
print(C)

Submission status: Runtime Error

Solution code:
n=input()
nums=list(map(int,input().split()))

ans = 1
over = 10**18

for num in nums:
    if ans > over:
        print(-1)
        exit()
    ans = ans * num

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
prod=1
for i in range(0,n):
  u=int(input())
  prod=prod*u
if(prod>1000000000000000000):
 print(-1)
else:
 print(prod)

Submission status: Runtime Error

Solution code:
n=int,input()
a=list(map(int,input().split()))
from operator import mul
from functools import reduce
x=reduce(mul, a)
if x>=10**18:
    print('-1')
else:
    print(x)

Submission status: Runtime Error

Solution code:
s = (input())
a,b = s.split(' ')
a = (int)(a)
x,y = b.split('.')
x = (int)(x)
y = (int)(y)
a1 = a*x
a2 = a*y
a2  = (int)(a2/100)
print(str(a1+a2),end = ' ')

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
A = int(input())
B = int(input())
# 出力
print(A*B)

Submission status: Runtime Error

Solution code:
A, B = int(input().split())
print(A*B)

Submission status: Runtime Error

Solution code:
s = (input())
a,b = s.split(' ')
a = (int)(a)
x,y = b.split('.')
x = (int)(x)
y = (int)(y)
a1 = a*x
a2 = a*y
a2  = (int)(a2/100)
print((a1+a2),end = ' ')

Submission status: Runtime Error

Solution code:
N=int(input())
P=[list(map(int,input().split()))]
import numpy
Q=numpy.array(P)
result =numpy.prod(Q[0])

if result>10**18:
    print(-1)
else:
    print(result)

Submission status: Runtime Error

Solution code:

n = int(input())
A = [int(i) for i in input().split()]

result = 1

for i in range(len(A)):
    if A[i] == 0:
        print(0)
        exit()

for i in range(len(A)):
    result = result * A[i]

if result > 10**18:
    print(-1)
else:
    print(result)

Submission status: Runtime Error

Solution code:
N = int(input())
num = list(map(int,input().split()))
a = 1
for n in range(N):
  a = num[n]*a
if a> 10**18:
  a=-1
print(a)

Submission status: Runtime Error

Solution code:
n=int(input())
a=input().split()
a=list(map(int,a))
i=0
ans=1
for calc in a:
    if(0 in a==True):
        print(0)
        exit()
    ans=ans*a[i]
    i+=1
    if(i==n):
        break
if(ans>1000000000000000000):
    print(-1)
else:
    print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
P=[list(map(int,input().split()))]
import numpy
P=numpy.array(P)
result =numpy.prod(P[0])

if result>10**18:
    print(-1)
else:
    print(int(result))

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
result = 1
checker =False
for j in a:
  if j > 1000000000000000000:
    result = -1
    checker =True
if 0 in a:
  result = 0
  checker=True
import numpy as np
while checker==False:
  #import numpy as np
  a = np.array(a)
  result = int(a.prod())
  checker = True
    

if result <= 1000000000000000000:
  print(result)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
n = int(input())
r = list(map(int,input().split()))

for i in range(n):
    if i == 0:
        x = r[i]
    else:
        x = x * r[i]
    
    if x >= 10**19:
        x = -1
        break

if x > 10**18:
        x = -1
print(int(x))

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
print(x * y)

Submission status: Runtime Error

Solution code:
a, b = input().split()
print(a*b)

Submission status: Runtime Error

Solution code:
import sys

n = int(input())
A = [int(i) for i in input().split()]

result = 1

for i in range(len(A)):
    if A[i] == 0:
        print(0)
        sys.exit()

for i in range(len(A)):
    result = result * A[i]

if result > 10**18:
    print(-1)
else:
    print(result)

Submission status: Runtime Error

Solution code:
n=int(input())

a = list(input().split())
a = [int(i) for i in a]
ans=1

if len(a) % 2 == 1: 
  for i in range(1, int(len(a)/2)+2):
    if ans > 10**18 or ans == 0:
      break
    if a[i-1] == 1:
      continue
    if i == int(len(a)/i) + 1:
      ans = ans*a[i-1]
    else:
      ans = ans*a[i-1]*a[-1*i]
    
else:
  for i in range(0, int(len(a)/2)):
    if ans > 10**18 or ans == 0:
      break
    if a[i-1] == 1:
      continue
    ans = ans*a[i]*a[-1 - i]
    

if ans > 10**18:
  print('-1')
else:
  print(ans)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
C = A * B
print(C)

Submission status: Runtime Error

Solution code:
import numpy as np
N = int(input())
A = list(map(int, input().split()))
if N > len(A):
  print(0)
else:
  tmp = 1
  for i in range(N):
    tmp *= A[i]
  if np.log10(tmp) > 18:
    print(-1)
  else:
    print(tmp)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
i=1
sum=A[0]
while A[0]<=10**18 and i<=N-1:
   sum*=A[i]
   i+=1
if sum>10**18:
   sum=-1
print(sum)

Submission status: Runtime Error

Solution code:
in_str = input().split(" ")
in_int = int(in_str)
result = in_int[0]*in_int[1]
print(result)

Submission status: Runtime Error

Solution code:
import numpy as np
import sys
input = sys.stdin.readline

n = int(input())
a = list(map(int,input().split()))
ans = 1

for i in a:
    ans = ans*i
    if ans > 1000000000000000000:
        ans = -1
        exit
    elif ans == 0:
        exit

print(ans)

Submission status: Runtime Error

Solution code:
def main():
    _ = input()
    a = sorted(list(map(int, input().split())), reverse=True)
    if a[-1] == 0:
        print(0)
        return
    x = 1
    m = 10 ** 18
    for i in a:
        if i > m:
            print(-1)
            return
        if i < 2:
            continue
        x *= i
    print(-1 if x > 10 ** 18 else x)


if __name__ == '__main__':
    main()