
大数运算
恋上鱼的猫
这个作者很懒,什么都没留下…
展开
-
HDU 1002 A+B(大数)
http://acm.hdu.edu.cn/showproblem.php?pid=1002 解题思路:没什么特殊思路,就是大数相加,用数组做。 #include #include #define Size 1001char a[Size];char b[Size];int res[Size];int main(){ int NumOfTe原创 2009-08-07 13:10:00 · 964 阅读 · 0 评论 -
FOJ 1404 Andy 的作业
http://acm.fzu.edu.cn/problem.php?pid=1404 解题思路:大数相乘,不过我的程序放在FOJ上运行时,拆成6位或13位为一个元素值才能过,拆成其他位,就过不了,不明原因,深感郁闷中,纠结了我一个晚上。以后把原因找出来了再次更新吧。 #include #include #define LL unsigned long long#原创 2009-08-12 10:16:00 · 808 阅读 · 0 评论 -
FOJ 1698 最大乘积
http://acm.fzu.edu.cn/problem.php?pid=1698 解题思路:高精度乘法 #include #include #define LL long struct Anode{ int value[145]; int size;}a;struct Bnode{ LL value[500]; int原创 2009-08-11 19:39:00 · 1058 阅读 · 0 评论