TMUL - Not So Fast Multiplication

Multiply the given numbers.

Input

n [the number of multiplications ≤ 1000]
l1 l2 [numbers to multiply (at most 10000 decimal digits each)]

Text grouped in [ ] does not appear in the input file.

Output

The results of multiplications.

Example

Input:
5
4 2
123 43
324 342
0 12
9999 12345

Output:
8
5289
110808
0
123437655

Warning: large Input/Output data, be careful with certain languages


Added by:Darek Dereniowski
Date:2004-10-19
Time limit:2.226s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM32-GCC GAWK MAWK BC C-CLANG NCSHARP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GOSU GRV JS-MONKEY JULIA KTLN NIM NODEJS OBJC OBJC-CLANG OCT PICO PROLOG PYPY PYPY3 PY_NBC R RACKET RUST CHICKEN SED SQLITE SWIFT UNLAMBDA VB.NET
Resource:Copy of MUL problem with 12s time limit

hide comments
2024-02-08 16:18:42
C++ throw me wrong answer but ideone.com input is fine.
2018-06-03 16:42:57
Python3
2018-02-01 20:21:11
Can not submit when choosing cpp as language page does not go to status page.
2017-12-19 15:28:27
How to do this in java?
code---
import java.util.*;
import java.lang.*;

class Main
{
public static void main (String[] args) throws java.lang.Exception
{
float L1 = 0 ;
float L2 = 0;
for(int n = 0 ; n < 1 ; n --){
System.out.println(L1*L2);
}
}
}
Result -- Time limit exceeded!
2017-08-16 10:16:40
Why it is so easy in python, but a pain in C. Getting wrong answer every single time
2017-06-19 19:14:55
101th on spoj !!
Python3 AC in one go !
2017-02-22 13:14:19
It is working in ideone.com but here it shows wrong answer
2016-07-29 06:39:21
Why is this problem not supported C++14?
2015-08-19 22:42:47 Shaunak Guharay
So easy in python. Same code as MUL
2015-07-17 07:35:19 shivjeet kumar singh
Two lines code in java.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.