N
N
NikSIk312019-05-09 18:49:13
Mathematics
NikSIk31, 2019-05-09 18:49:13

How to implement an example in C/C++?

There are numbers A and B , you need to calculate C from the formula C^B = 1 (mod A)
how can this be calculated?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Moseychuk, 2019-05-09
@fshp

This problem has an infinite number of solutions.
And C++ has nothing to do with it. This is algebra.
Example: A=2, B=3.
Then C can be any positive odd number.
The degree is the multiplication of the same numbers. Multiplying any number of odd numbers will give an odd number. An odd number always has a remainder of 1 when divided by 2.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question