How can I multiply really big numbers c++

前端 未结 9 1664
梦谈多话
梦谈多话 2021-01-18 10:09

I have the following code

      int i, a, z;
i = 2343243443;
a = 5464354324324324;
z = i * a;
cout << z << endl;

When these are

9条回答
  •  清酒与你
    2021-01-18 10:55

    You can use queue data structure to find the product of two really big numbers with O(n*m). n and m are the number of digits in a number.

提交回复
热议问题