随笔分类 - 数学-快速乘快速幂
摘要:There are N children in kindergarten. Miss Li bought them N candies. To make the process more interesting, Miss Li comes up with the rule: All the chi
阅读全文
摘要:取英文首字母来命名函数名称: (1) multiply乘;(2) power-幂;(3) quick-快速;(4) mod-取模 ①快速乘 由于计算机底层设计的原因,做加法往往比乘法快的多,因此将乘法转换为加法计算将会大大提高乘法运算的速度,除此之外,当我们计算 a*b%mod 的时候,往往较大的数
阅读全文

浙公网安备 33010602011771号