如何计算形式的模量(a * b)%c? [英] How to calculate modulus of the form (a*b)%c?
本文介绍了如何计算形式的模量(a * b)%c?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何计算形式的模数(a * b)%c?
How to calculate modulus of the form (a*b)%c?
我想计算两个int数的乘数,溢出阶段...
i want to calculate modulus of multiplication of two int numbers where they are almost in the stage of overflow...
这里c也是int
推荐答案
(a * b) % c == ((a % c) * (b % c)) % c
这篇关于如何计算形式的模量(a * b)%c?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文