ACM公选课第四节高精度 2020.4.9课-2020.4.10补

最近几年有点不火了,java python 没这情况,c++才要优化
longlong 100位算不了

ACM公选课第四节高精度 2020.4.9课-2020.4.10补
在航电能过,另一个可能就过不了,求n的阶乘的位数

pku1423

ACM公选课第四节高精度 2020.4.9课-2020.4.10补
多组数据,时间求和,直接爆炸
真就记忆数组拯救世界呗,,,,,,,,,,,,
ACM公选课第四节高精度 2020.4.9课-2020.4.10补
ACM公选课第四节高精度 2020.4.9课-2020.4.10补
反正是位数,误差不大 100以内单独算

一个数论公式 Stirling

ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补

大数 有的用模板

ACM公选课第四节高精度 2020.4.9课-2020.4.10补

pku2562 nefu880

进位了几次,,,,,
ACM公选课第四节高精度 2020.4.9课-2020.4.10补
俺的思路:像数字逻辑那样加一个c进位器?,进位为1,无进位为0? ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补
和猜的一样
ACM公选课第四节高精度 2020.4.9课-2020.4.10补

nefu72

ACM公选课第四节高精度 2020.4.9课-2020.4.10补
要注意到,每乘一次结果是多少位,
ACM公选课第四节高精度 2020.4.9课-2020.4.10补
但更简单做法是直接从左往右搜第一个不为0的
ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补
是阶乘,i就是那个不断增加的
其实s=… f[j]=s%10有点浪费,但这么写确实太简单了,可以容忍吧
ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补
时间有点长了,:

这可真是!!!没想过的加速法

ACM公选课第四节高精度 2020.4.9课-2020.4.10补
细节:不足填0
ACM公选课第四节高精度 2020.4.9课-2020.4.10补

继续提速

ACM公选课第四节高精度 2020.4.9课-2020.4.10补
控制了长度,不每次都全算
ACM公选课第四节高精度 2020.4.9课-2020.4.10补

字符串版

ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补
ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补

基本思路

ACM公选课第四节高精度 2020.4.9课-2020.4.10补

Nefu73

ACM公选课第四节高精度 2020.4.9课-2020.4.10补
ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补

高精加法 Nefu880

ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补
要选出哪个更大
ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补

Hdu1316

有多少个斐波那契额数列?
100位内的斐波那契数
ACM公选课第四节高精度 2020.4.9课-2020.4.10补
打表,然后找上下upperbowd?
char数组内,很长,还要2分 还有高精度

高精度乘法

ACM公选课第四节高精度 2020.4.9课-2020.4.10补

eg

ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补ACM公选课第四节高精度 2020.4.9课-2020.4.10补