mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-03 10:39:42 +08:00
Resolve line_length errors in math/mod_inverse_by_fermat_theorem.cpp
This commit is contained in:
@@ -45,12 +45,17 @@ int64_t binExpo(int64_t a, int64_t b) {
|
||||
}
|
||||
|
||||
int main() {
|
||||
// Take input of a. (A number for which we want to find modular inverse with m)
|
||||
|
||||
int64_t a;
|
||||
/*
|
||||
Take input of a.
|
||||
(A number for which we want to find modular inverse with m)
|
||||
*/
|
||||
|
||||
std::cout << "Give input a for computing ((a^(-1))%(m)) : ";
|
||||
std::cin >> a;
|
||||
|
||||
std::cout << "The modular inverse of a with mod m is (a^(m-2)) equivalent (a^(-1)) mod m : ";
|
||||
std::cout << "The modular inverse of a with mod m is (a^(m-2)) : ";
|
||||
std::cout << binExpo(a, m-2) << std::endl;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user