MUL - Fast Multiplication

Multiply the given numbers.


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.


The results of multiplications.


4 2
123 43
324 342
0 12
9999 12345


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

hide comments
Rashmi: 2014-05-13 18:20:42

My program produces the correct output for the sample input you have given, but why it still says its wrong answer when I submit my code?

Charizard_: 2014-05-13 18:20:42

mine too s correct but getting TLE.....

edit: make sure your algo is fast enough
make sure ur I/O is fast enough
in case of C++: use scanf,printf than cin,cout
in case of Java: use BufferedReader than Scanner

Last edit: 2011-05-14 23:52:22
Shreya Inamdar: 2014-05-13 18:20:42

please suggest a few more test cases.All the given test cases give right results but still it shows "WA"

Archzilon Eshun-Davies: 2014-05-13 18:20:42

I keep trying out my code and I keep getting "runtime error" but when I try to run it locally on my OpenBSD4.8 it works perfectly could we get more accurate sample input like the so could 10000 digits.

Sherimbek Junushev: 2014-05-13 18:20:42

My program shows time limit too

satyaprakash patel: 2014-05-13 18:20:42

i know my coding for this program is 100% corect.....but status shows error......
please tell me which type of coding i do for this.....

Venkateshwaran.M: 2014-05-13 18:20:42

my program run on system turbo c nd gave correct output bt result s run time

Last edit: 2011-02-17 10:09:39
Lureohc Otnafifa: 2014-05-13 18:20:42

why TLE..?? who can help me???

YatsukoYin: 2014-05-13 18:20:42

Should we use FFT to solve this problem or something else?

used FFT - got TLE...
tomorrow will try Karatsuba...

Last edit: 2011-01-24 18:35:42
oleng: 2014-05-13 18:20:42

my program in c++ was produces the correct output,but why it still wrong answer??

Added by:Darek Dereniowski
Time limit:1.649s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)