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

Solution in C++ (GCC 9.2.1) (judge verdict: Wrong Answer)

#include<bits/stdc++.h>
#define    fios ios_base::sync_with_stdio(false); cin.tie(0);
#define    sf(x) scanf("%d",&x)
#define    sfl(x) scanf("%lld",&x)
#define    pf(x) printf("%d\n",x)
#define    pfl(x) printf("%lld\n",x)
#define    ll long long
#define    nl "\n"
#define    PB(x) push_back(x)
#define    For(i,n) for(int i=0; i<n; i++)
#define    PI acos(-1)
using namespace std;


int main()
{
  int n;

  cin>>n;

  ll a[n],ans=1,ans2=1;
  bool fl=0;

  for(int i=0; i<n; i++)
  {
    cin>>a[i];

    if(a[i]==0)
    {

        fl=0;
        ans=0;
        break;

    }

    ans2=ans*a[i];

    if(ans*a[i]>(int)1e18 || ans2/ans!=a[i])
    {

      fl=1;

    }

    ans*=a[i];

   // ans2*=a[i];


  }

  if(fl==0)
    {
        cout<<ans<<nl;
    }
    else
        cout<<-1<<endl;


    return 0;
}