<pre name="code" class="cpp">#include "oj.h"
#include<iostream>
int main(void)
{
string strMultiplierA = "9999";
string strMultiplierB = "9999";
string strRst = "\0";
multiply (strMultiplierA,strMultiplierB,strRst);
cout << strRst;
return 0;
}
/*****************************************************************************
Prototype : multiply
Description : 两个任意长度的长整数相乘, 输出结果
Input pAram :
const std::string strMultiplierA 乘数A
const std::string strMultiplierB 乘数B
Output :
std::string strRst 乘法结果
Return Value :
int 0 正确
-1 异常
*****************************************************************************/
int multiply (const std::string strMultiplierA,const std::string strMultiplierB, std::string &strRst)
{
/* 在这里实现功能 */
string chengshuA = strMultiplierA;
string chengshuB = strMultiplierB;
int a = chengshuA.length();
int b = chengshuB.length();
int strRst_length = 0;
int c =
两个任意长度的长整数相乘(华为oj,C++)
最新推荐文章于 2025-06-28 10:54:38 发布