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())
A = list(map (int, input().split()))
if 0 in A:
  print(0)
  return
 
re = 1
for i in range(N):
    re *= A[i]
    if re >= pow(10,18):
        print(-1)
        return
else:
    print(re)
    return

Submission status: Runtime Error

Solution code:
from sys import stdin
from functools import reduce 

# 標準入力から読み込み
inputs = [list(map(int, input().split())) for _ in range(2)]
inputs = inputs[1]

if (0 in inputs):
  output = 0
else:
  output = reduce((lambda x, y: -1 if (x * y) > 1e18 or x < 0 or y < 0  else (x * y)), inputs)

print(output)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())
# スペース区切りの整数の入力
b = int(input())

# 出力
print(a*b)

Submission status: Runtime Error

Solution code:
#------------------------template--------------------------#
import os
import sys
from math import *
from collections import *
#from fractions import *
from bisect import *
from io import BytesIO, IOBase
def vsInput():
    sys.stdin = open('input.txt', 'r')
    sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
def value():return tuple(map(int,input().split()))
def array():return [int(i) for i in input().split()]
def Int():return int(input())
def Str():return input()
def arrayS():return [i for i in input().split()]

#-------------------------code---------------------------#
#vsInput()

n=Int()
a=array()
ans=1
for i in a:
    ans*=i
    if(ans>10**18):
        ans=-1
        break
    elif(ans==0):
        break
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())

a=N%10

if a==2 or a==4 or a==5 or a==7 or a==9:
  print('hon')
elif a==0 or a==1 or a==6 or a==8:
  print('pon')
else:
  print('bon')

Submission status: Runtime Error

Solution code:
from sys import stdin, stdout
def main():  
    n = int(stdin.readline())
    ans = 1
    a = stdin.readline()
    k = a.split(' ')
    for i in k:
        ans = ans*int(i)
    if ans > 1e18:
        ans = -1
    stdout.write(str(ans)) 
  
if __name__ == "__main__": 
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=input()

print(a*b)

Submission status: Runtime Error

Solution code:
def main ():
	N = int(input())
	A = list(map(int,input(). split ()))
	if 0 in A:
		print(0)
		return
	prod = 1
	for a in A:
		prod *= a
		if prod > 1000000000000000000:
			print(-1)
			return
	print(prod)
main()

Submission status: Runtime Error

Solution code:
def main ():
N = int(input())
A = list(map(int,input(). split ()))
if 0 in A:
	print(0)
	return
prod = 1
for a in A:
	prod *= a
	if prod > 1000000000000000000:
		print(-1)
		return
print(prod)

Submission status: Runtime Error

Solution code:
a = map(int,input().split())
print(a[0]*a[1])

Submission status: Runtime Error

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

print ans

Submission status: Runtime Error

Solution code:
N, S = map(int,input().split())
A = list(map(int,input().split()))
mod = 998244353
dp = [[0 for j in range(S + 1)] for i in range(N + 1)]
dp[0][0] = 1
for i in range(N) : 
    for j in range(S + 1) : 
        dp[i + 1][j] += 2 * dp[i][j]
        dp[i + 1][j] %= mod 
        if j + A[i] <= S : 
            dp[i + 1][j + A[i]] += dp[i][j]
            dp[i + 1][j + A[i]] %= mod
print(dp[N][S])

Submission status: Runtime Error

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

    for i in range(len(arr)):
        a = 0
        b = arr[i]
        while a < b[1]:
            a = a+a+1
            n = n+1
    print(n)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

try:
    for c in kita:
        if seki > 10**18:
            print("-1")
            break
        else:
            seki = seki * int(c)
            if seki > 10**18:
                print("-1")
            else:
                print(seki)
except:
    print("-1")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input()
int_list = list(map(int, input().split()))
max_num = 10**18
ans = 1

if 0 in int_list:
  print(0)
  exit()
  
for i in int_list:
    ans *= i
    if ans > max_num:
            print(-1)
        break
else:
    print(ans)

Submission status: Runtime Error

Solution code:
def main ():
N = int(input())
A = list(map(int,input().split()))
if 0 in A: print (0)
return
prod = 1 for a in A:
prod *= a
if prod > 1000000000000000000:
print(-1) return
print(prod) main ()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <vector>
#include <unordered_set>
#include <unordered_map>

using namespace std;

int main()
{
    int x, y;
    cin >> x >> y;
    cout << x*y << endl;
}

Submission status: Runtime Error

Solution code:
#include"bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp> 
using namespace __gnu_pbds; 
using namespace std;

#define double long double
#define int long long
#define pb push_back 
#define eb emplace_back
#define Z(c) (int)(c).size()
#define L(c) c[Z(c)-1]
#define F first
#define S second
#define nl "\n"
#define mii map<int,int>
#define sp fixed<<setprecision 
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define rep(i,iv,n) for(int (i)=(iv);(i)<(n);++(i))
#define FO fflush(stdout) 
#define D1(x) cerr <<"At line "<<__LINE__<<" "<<#x<<"="<<x<<nl
#define D2(x,y) cerr <<"At line "<<__LINE__<<" "<<#x<<"="<<x<<" "<<#y<<"="<<y<<nl
#define D3(x,y,z) cerr <<"At line "<<__LINE__<<" "<<#x<<"="<<x<<" "<<#y<<"="<<y<<" "<<#z<<"="<<z<<nl
#define tr(it,ct) for(auto &(it) : (ct))
#define pi acos(-1)
#define prt(ct) for(auto &(it) : (ct)) cerr<<it<<" "; cerr<<nl
#define prtp(ct) for(auto &(it) : (ct)) cerr<<it.F<<" "<<it.S<<nl; cerr<<nl

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > pii;
typedef pair<pii,pii> ppp;
typedef vector< pii > vp;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, 
             tree_order_statistics_node_update> baap;

template<typename T> 
void swap(T &a,T &b)
{ auto tm=a; a=b; b=tm; }

template<typename T> 
void mina(T& a, T b) { 
    a = min(a, b); 
}
template<typename T>
void maxa(T& a, T b) { 
    a = max(a, b); 
}

  const int mod=1000000009;
  const int mod2=998244353;
  const int INF=1e18;
  const int N=2e5+25;  
  const int M=1e5+1;           


 void doit()
 { 
   int a,b; cin>>a>>b; cout<<a*b;
 }

signed main()
{ 
   ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

   int tc=1;                         
   // cin>>tc;

  rep(i,1,tc+1)
  { // cout<<"Case #"<<i<<": ";
  
   doit();
   if(i<tc)
   cout<<nl;
  }
  
 return 0; 
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input()) #1行目のNを取得する
s_char = list(input().split())
s = [int(n) for n in s_char]
ans = 1

for num in s:
    if len(str(ans))+len(str(num))>20:
        #print('e')
        ans = -1
        break
    ans *= num
    if ans > 10**18:
        ans = -1
        break

for num in s:
    if num == 0:
        ans = 0
        
print(ans)

Submission status: Runtime Error

Solution code:
numa,numb=int(input().split())
print(numa*numb)

Submission status: Runtime Error

Solution code:
N = int(input()) #1行目のNを取得する
s_char = list(input().split())
s = [int(n) for n in s_char]
ans = 1

for num in s:
    if len(str(ans))+len(str(num))>20:
        #print('e')
        ans = -1
        break
    ans *= num
    if ans > 10**18:
        ans = -1
        break

for num in s:
    if num ==0:
        ans =0
        
print(ans)

Submission status: Runtime Error

Solution code:
num = int(input())
numbers = list(map(int,input().split()))
sum = 1
for i in range(num):
  sum *=numbers[i]
  if (sum>(10**18)):
    sum = -1
    break
if 0 in numbers:
  sum = 0
print (sum)

Submission status: Runtime Error

Solution code:
def main():
N=int(input())
A=list(map(int,input().split()))
if A is 0:
  print(0)
  return
p=1
for i in A:
  p=p*i
  if p>1000000000000000000:
    print(-1)
    return
print(p)  
main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
val1 = input()
val2 = input()

print(int(val1) * int(val2))

Submission status: Runtime Error

Solution code:
a,b = map(int, input.split())

print(a * b)

Submission status: Runtime Error

Solution code:
def solve():
    n = int(input())
    a = list(map(int, input().split()))

    ans = 1
 
    for i in a:
        ans *= i
      	if ans > int(1e18): return -1
    
    
    return ans
    

print(solve())

Submission status: Runtime Error

Solution code:
S1, S2 = input().strip().split()
print(S1*S2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans=1

if 0 in a:
    print(0)
    exit()

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


print(ans)

Submission status: Runtime Error

Solution code:
def main ():
	N = int(input())
	A = list(map(int,input(). split ()))
	if 0 in A:
		print(0)
		return
	prod = 1
	for a in A:
		prod *= a
		if prod > 1000000000000000000:
			print(-1)
			return
	print(prod)
main ()

Submission status: Runtime Error

Solution code:
a ,b= = map(int,input().split())

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin

def main():
  read = stdin.readline
  N = int(read())
  data = list(map(int,read().split(" ")))
  ans = 1
  flg = False
  for i in data:
    if i == 0:
      print("0")
      flg = True
      break
    if ans*i > 10**18:
      print("-1")
      flg = True
      break
    else:
      ans *= i
      
  if not flg:  
    print(ans)
  
  
if __name__ == "__main__":
  main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def mul(num1. num2):
  return num1 * num2

num(2, 5)

Submission status: Runtime Error

Solution code:
n = int(input())
"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""
# n == 1のとき、[1, 1]を返す
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
num = factorization(n)
kazu = []
for num_i in num:
    cnt = 1 #num_i[0]
    hoge = num_i[0]
    for i in range(num_i[1]):
        cnt *= hoge
        kazu.append(cnt)
kazu.sort()
cnt = 0
ans = 1
while ans <= n:
    ans *= kazu[cnt]
    cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
def main():
  a,b = list(map(int,input().split()))
    print(a*b)
main()

Submission status: Runtime Error

Solution code:
import math
 
n=int(input())
ls=[int(s) for s in input().split(" ")]
 
if 0 in ls:
  print(0)
else:
  num=0
  for i in ls:
    num+=math.log10(i)
 
  if num <= 18:
    print(int(round(10**num,5)))
  else:
    print(-1)

Submission status: Runtime Error

Solution code:
def main():
	N =int(input())
	A =list(map(int,input().split()))
	if 0 in A:
    	print(0)
    	return prod = 1
	for a in A:
    	prod *= a
		if prod > 1000000000000000000:
      		print(-1)
      		return 
    print(prod)

main()

Submission status: Runtime Error

Solution code:
def main():
  N =int(input())
  A =list(map(int,input().split()))
  if 0 in A:
    print(0)
    return prod = 1
  for a in A:
    prod *= a
    if prod > 1000000000000000000:
      print(-1)
      return 
  print(prod)

main()

Submission status: Runtime Error

Solution code:
A = int(input())
B=  int(input())

ans = A*B
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
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

f = factorization(n)
ans = 0
for i, j in f:
    ans += int((-1+pow(1+8*j,0.5))/2)
print(ans)

Submission status: Runtime Error

Solution code:
a, b = int(x) for x in input().split()
print(a*b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
mul = 1
lst = list(map(int,input().split()))
lst.sort()
flg = True
for ele in lst:
    mul = mul *ele
    if(mul > 1e18):
      `print(-1)
        flg = False
    if mul == 0:
        print(0)
        flg = False
if flag:
    print(mul)

Submission status: Runtime Error

Solution code:
def main ():
    N = int(input())
    A = list(map(int,input(). split ()))
    if 0 in A:
        print(0)
        return
    prod = 1
    for a in A:
        prod *= a
        if prod > 1000000000000000000:
            print(-1)
            return
    print(prod)
main ()

Submission status: Runtime Error

Solution code:
from decimal import *
i = input().split()
a = int(i[0])
b = Decimal(i[1])i
print(int(a * b))

Submission status: Runtime Error

Solution code:
a,b = map(str,input().split())
a = int(a)
b1,b2 = map(int,b.split("."))
ans = a* (b1 * 100 + b2)
print(ans//100)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    A = int(input())
    B = int(input())
    ans = a(A, B)
    print(ans)

def a(A, B):
    return (A * B)

main()

Submission status: Runtime Error

Solution code:
a=input()
b=input()

print(int(a)*int(b))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def a(A B)
	return A * B

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())

a * b = c

print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())

print(a*b)

Submission status: Runtime Error

Solution code:
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
mod = 998244353
N,S = map(int,readline().split())
A = list(map(int,readline().split()))
dp = [[0 for _ in range(S+1)] for _ in range(N+1)]
dp[0][0] = 1
for i in range(N):
  for j in range(S+1):
    dp[i+1][j] += 2*dp[i][j]
    dp[i+1][j] %= mod
    if j + A[i] <=S:
      dp[i+1][j+A[i]] += dp[i][j]
      dp[i+1][j+A[i]] %= mod
print(dp[N][S]%mod)

Submission status: Runtime Error

Solution code:
n = int(input())
values = input().split()

mult = 1
for i in range(len(values)):
  mult *= int(values[i])
  
if mult > 10**18:
  print(-1)
else:
  print(mult)

Submission status: Runtime Error

Solution code:
values = split(input())
print(values[0] * values[1])

Submission status: Runtime Error

Solution code:
N = input()
A = list(map(int,input().split(' ')))
if 0 in A:
    print(0)
    exit()
x = 1
for a in A:
    x *= a
    if x > 1000000000000000000:
        print(-1)
        exit()
print(x)

Submission status: Runtime Error

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

print(a * b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
kari

Submission status: Runtime Error

Solution code:
test

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from decimal import Decimal


def main():
    A, B = map(Decimalt,input().split())

    print(int(A*B))
    return

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
from decimal import Decimal


def main():
    A, B = map(Decimalt,input().split())
    print(int(A*B))

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
ans = 1
lim = 10**18
n = int(input())
a = list(map(int, input().split()))
for x in a:
	ans *= x
if ans > lim:
	print(-1)
else:
	print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
a = map(int, input().split())
ans = 1
for i in a:
    ans *= i
if ans > 1e18:
    print(-1)
else:
    print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = gets.split.map(&:to_i)
print(a*b)

Submission status: Runtime Error

Solution code:
num1 = A
num2 = B
print(num1 * num2)

Submission status: Runtime Error

Solution code:
import sys
A=int(sys.argv[1])
B=int(sys.argv[2])
print(A*B)

Submission status: Runtime Error

Solution code:
import math,sys
N = int(input())
A = list(map(int, input().split()))
ans = 1

if 0 in A:
    print(0)
    sys.exit()

for i in range(N):
    ans = ans*A[i]
    # if ans > pow(10,18):#pythonはオーバーフローしないからこれでも行ける
    if A[i] > 10**18/ans:#普通だったらオーバーフローしないようにやる
        # ans *= A[i]#こう書け
        print(-1)
        sys.exit()

print(ans)

Submission status: Runtime Error

Solution code:
def solve() :
    a, b = input().split()

    a = int(a)
    b = b.replace('.', '')
    b100 = int(b[0])*100 + int(b[1])*10 + int(b[2])*1

    print(a*b100//100)
    return


if __name__ == "__main__" :
    solve()

Submission status: Runtime Error

Solution code:
def solve() :
    n = int(input()) 
    a = list(map(int, input().split()))

    total = 1

    if 0 in a :
        print(0)
        return

    for i in a :
        total *= i

        if total > 10 ** 18 :
            print(-1)
            return

    print(total)

if __name__ == "__main__" :
    solve()

Submission status: Runtime Error

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

dp = [[{} for i in range(S+1) ] for j in range(N+1)]
dp[0][0][0]=1
#print(dp)
for i in range(1,N+1):
  #print(i)
  a = A[i-1]
  if i==0:
    if a <= S:
      dp[i][a][1] = 1  
    continue
  for j in range(S+1):
    if len(dp[i-1][j])>0:
      for key, value in dp[i-1][j].items():
        dp[i][j][key] = value
    if j>=a:
      if len(dp[i-1][j-a]) > 0:
        for key, value in dp[i-1][j-a].items():
          if (key+1) in dp[i][j]:
            dp[i][j][key+1] += value
          else:
            dp[i][j][key+1] = value
last = dp[-1][-1]
ans = 0
for key, value in last.items():
  ans += 2**(N-key) * value
  ans %= 998244353
#print(last)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from operator import mul
from functools import reduce

#while True:
N = int(input())
#	if N>=2 and N<=10**5:break

if 2 <= N <= 10**5:
	num = list(map(int, input().split()))
	
#print(num)
ans = reduce(mul,num)
if ans > 10**18:
	print(-1)
else:
	print(ans)

Submission status: Runtime Error

Solution code:
print(input()*input())

Submission status: Runtime Error

Solution code:
from collections import Counter

def prime_factor(num):
  factor_list = []
  while num % 2 == 0:
    factor_list.append(2)
    num /= 2
  f = 3
  while f * f <= num:
    if num % f == 0:
      factor_list.append(f)
      num /= f
    else:
      f += 2
  if num!=1:
    factor_list.append(num)
  return factor_list

def get_count(c):
  ans = 0
  _max = c
  for i in range(1,c+1):
    if i <= _max:
      ans += 1
      _max -= i
    else:
      break
  return ans
a = int(input())
counter = Counter(prime_factor(a))
ans = 0
for i in counter:
  ans += get_count(counter[i])
print(ans)

Submission status: Runtime Error

Solution code:
print(list(map(int,input().split()))[0]*list(map(int,input().split()))[1])

Submission status: Runtime Error

Solution code:
N = int(input())
MX = 10**18
a = list(map(int, input.split()))
if 0 in a:
    print(0)
    exit(0)
ans = 1
for x in a:
    ans *= x
    if ans > MX:
        print(0)
        exit(0)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
mx = 10**18
a = list(map(int, input().split()))
for x in a:
    if x == 0:
        print(0)
        exit(0)
ans = 1
for x in a:
    ans *= x
    if ans > mx:
        print(-1)
        exit(0)
print(ans)

Submission status: Runtime Error

Solution code:
def input():
    return sys.stdin.readline()[:-1]
a, b= input().split()
a = int(a)
b = int(b.replace(".", ""))
output = a * b // 100
print(output)

Submission status: Runtime Error

Solution code:
def input():
    return sys.stdin.readline()[:-1]
a, b= input().split()
a = int(a)
b = int(b.replace(".", ""))
# floatをそのまま掛け算すると大きい計算で誤差が生じるため、.を消してintにする。
output = a * b // 100
# 小数点は2桁までで確定なので、100で切り捨て除算する。
print(output)

Submission status: Runtime Error

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
li = list(map(int, input().split()))
ans=1
for i in li:
    ans*=i
if ans >1000000000000000000:
	print("-1")
	exit()
else:
	print(ans)

Submission status: Runtime Error

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
li = list(map(int, input().split()))
ans=1
for i in li:
    ans*=i
if ans >1000000000000000000:
	print("-1")
    exit()
else:
	print(ans)

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(1000000)
import math
a, b = input().split()
c = int(math.floor(int(a) * float(b))
print(c)

Submission status: Runtime Error

Solution code:
n = int(input())
multi = list(map(int,input().split()))
result = 1 

for i in range(n):
    result = result * multi[i]
    if (result > 10**18):
        ans = -1
        exit()
        
print(result)

Submission status: Runtime Error

Solution code:
import math
A, B = input().split()
A = int(A)
B = int(B.replace('.', ''))
 
print(A*B//100))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = 1

if 0 in A:
    print(0)
    exit()

for i in range(N):
    ans *= A[i]

    if ans > 10**18:
        ans = -1
        break

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
s = list(map(int,input().split()))
if 0 in s:
  print(0)
  exit()
for _ in range(n):
  ans *= s[_]
  if ans > 10**18:
    print(-1)
    exit()
else:
  print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
return(int(input().split()[0])*(int(input().split()[1])))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = input()
B = input()

print(A * B)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
number =1

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

print(number)

Submission status: Runtime Error

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

arr.sort()
res = 1
flg = True
for i in arr:
    res*=i
    if res >10**18:
        flg = False
        print('-1')
    # print(res, res >=10**18)
if(flg):print(res)

Submission status: Runtime Error

Solution code:
import time
N, M = list(map(int, input().split()))

to = [[] for i in range(10**5)]

for _ in range(M):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    to[a].append(b)
    to[b].append(a)

MAX = 10**10


q = []
dist = [MAX for i in range(N)]
pre = [-1 for i in range(N)]

dist[0] = 0
q.append(0)

while len(q) != 0:
    time.sleep(0.3)
    v = q.pop(0)
    for u in to[v]:
        if (dist[u] != MAX):
            continue
        dist[u] = dist[v] + 1
        pre[u] = v
        q.append(u)
print('Yes')
for v in pre[1:]:
    print(v + 1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=input().split()
a=int(a)
b=list(b)
b=[b[0],b[2],b[3]]
c=a*b[0]+a*b[1]//10+a*b[2]//100
print(c)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(x)for x in input().split()]
T = 1

if 0 in A:
    print(0)
    exit
    
for x in A:
    T *= x
    if T > 10 ** 18:
        print(-1)
print(T)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
num = 1
flag = 0
c=list(map(int, input().split()))
for i in c:
    if i == 0:
        flag = 1
        print("0")
if flag == 0:
    for i in c:
        num *= i
    if num > 1000000000000000000:
        print("-1")
    else:
        print(num)