简体   繁体   English

以字符串形式存储的两个大数的模

[英]Modulo of two large numbers stored as strings

How to get modulo A%B where A and B are two very large numbers stored in a string variable in c++. 如何获得模A%B,其中A和B是存储在c ++中的字符串变量中的两个非常大的数字。 I know about(a^b)%1000000007 I know about(a%b) where a is large number. 我知道(a ^ b)%1000000007我知道(a%b)其中a很大。 But what if both a and b are very large 但是如果a和b都很大

使用像GMP这样的大数字库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM