MUL - 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


hide comments
sandeep48: 2019-01-20 07:57:21

if it is possible through c language please let me know the concept.just mail at
snip@gmail.com

Last edit: 2022-09-08 20:04:48
sonuexpc: 2019-01-14 13:57:26

6 lines of code in python,
my 100th :)

karankeswani99: 2018-12-19 12:39:25

AC in one go!!!! Just use BigInteger

sea_26: 2018-11-26 09:40:23

AC in 1 go.

afif_if18: 2018-10-26 01:38:47

why always wrong answer in c ?

kxingh: 2018-08-31 13:45:20

learn nothing except big integer library in java.
My 100th ....

ankur314: 2018-06-18 08:02:23

maybe this one was intended to give info about boost library

eagleshadow: 2018-05-13 08:22:34

can we use boost library in spoj??

(Reply from EB)
Currently, yes. For example, you can use "boost/multiprecision/cpp_int.hpp".

Last edit: 2018-05-13 08:55:13
zoyron: 2018-04-18 17:46:41

Python 5 lines, AC in one go :)

ameyanator: 2018-03-31 16:30:31

Python naam toh suna hi hoga :)


Added by:Darek Dereniowski
Date:2004-06-01
Time limit:1.649s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:PAL