Files
2025-12-26 17:35:14 +08:00

9 lines
516 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 超大整数加法
简单来说就是按位运算原始数据就按照string进行读取每次计算一位数值
就和小学时学加法一样计算,把加的数的最右位放入结果,左边的数存为当前的记录中,
计算完所有数之后,在把寄存结果处理一下,就可以了。
这也是一种暴力解决的方案。在实际运行中和python自身实现的运算大整数运算大差不差吧
但这个暴力方案时间稳定,这个倒是没错的。