本文介绍了面试问题-实施Biginteger Multiply的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实施Biginteger乘法

Implement Biginteger Multiply

  1. 使用整数数组存储biginteger例如297897654将存储为{2,9,7,8,9,7,6,5,4}
  2. 为bigintegers实现乘法功能
    范例:{2,9,8,8,9,8} * {3,6,3,4,5,8,9,1,2} = {1,0,8,6,3,7,1 ,4,1,8,7,8,9,7,6}
  1. use integer array to store a biginteger like 297897654 will be stored as {2,9,7,8,9,7,6,5,4}
  2. implement the multiply function for bigintegers
    Expamples: {2, 9, 8, 8, 9, 8} * {3,6,3,4,5,8,9,1,2} = {1,0,8,6,3,7,1,4,1,8,7,8,9,7,6}

我没有实现这门课,并认为它已经有几个星期了,无法得到答案.

I failed to implement this class and thought it for a few weeks, couldn't get the answer.

任何人都可以帮助我使用C#/Java来实现它吗?非常感谢.

Anybody can help me implement it using C#/Java?Thanks a lot.

推荐答案

您知道如何在纸上进行乘法吗?

Do you know how to do multiplication on paper?

  123
x 456
-----
  738
 615
492
-----
56088

我只会在代码中实现该算法.

I would just implement that algorithm in code.

这篇关于面试问题-实施Biginteger Multiply的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 22:48