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 Java (OpenJDK 1.8.0) (judge verdict: Runtime Error)

import java.util.*;
import java.io.*;
public class Main {
    public static void main (String [] args) throws IOException
    {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        long number = Long.parseLong(in.readLine());
        long divider = 1;
        ArrayList<Long> done = new ArrayList<Long>();
        ArrayList<Long> factors = new ArrayList<Long>();

        for(long i = 1; i < Math.sqrt(number); i++)
        {
            if(number % i == 0)
            {
                factors.add(i);
                factors.add(number/i);
            }
        }

        int times = 0;
        Collections.sort(factors);
        factors.remove(0);
        for(long i : factors)
        {
            if(i > number)
                break;
            boolean isPrime = true;
            for(long j = 2; j < Math.sqrt(i); j++)
            {
                if(i % j == 0)
                    isPrime = false;
            }
            if(isPrime)
            {
                boolean primeLoop = true;
                long primeExp = i;
                while(primeLoop)
                {
                    if(number % primeExp == 0)
                    {
                        times++;
                        
                        number /= primeExp;
                        primeExp *= i;
                    }
                    else
                    {
                        primeLoop = false;
                    }
                }
            }
        }
        
        
        
        /*
        int times = 0;
        for(long i = 2; i <= number; i++)
        {
            boolean runLoop = number % i == 0;
            boolean isPrime = runLoop;
            for(long j = 2; j < Math.sqrt(i) && runLoop; j++)
            {
                if(i % j == 0)
                    isPrime = false;
            }
            if(isPrime)
            {
                boolean primeLoop = true;
                long primeExp = i;
                while(primeLoop)
                {
                    if(number % primeExp == 0)
                    {
                        times++;
                        
                        number /= primeExp;
                        primeExp *= i;
                    }
                    else
                    {
                        primeLoop = false;
                    }
                }
            }
        }
        */
        System.out.println(times);
        


    }
}