![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM_大数据
文章平均质量分 71
runninghui
这个作者很懒,什么都没留下…
展开
-
大数加法
#include #include #include using namespace std; char str1[10000002],str2[10000002],result[10000010]; short add[10000000]; void bignumadd(char str1[],char str2[],char result[]) { long原创 2013-03-17 15:14:45 · 795 阅读 · 0 评论 -
大数乘法
#include #include #include using namespace std; char num1[100],num2[100],multi[100]; int begin; short result[100]; void bigmulti(char num1[],char num2[]) { int len1 = strlen(num1);原创 2013-04-14 15:31:10 · 773 阅读 · 0 评论 -
高精度开根
高精度开方,像python,haskell等语言原生支持高精度小数,做这个题不成问题,直接使用api即可。我习惯用java,研究BigDecimal发现里面没有开方的方法,所以需要手动实现。可以采用牛顿逼近法解决开方问题,可以用BigDecimal实现高精度。牛顿逼近法参见:http://baike.baidu.com/view/1514354.htm static int prec = 10转载 2013-05-10 14:23:29 · 2151 阅读 · 0 评论