Reverse number to a module m
📁 python, пример
The retu number is given two integers M and a. If there is no reverse number to a by module M, then remove the number & minus; 1, and if it exists, then withdraw this number (the answer should lie within the boundaries from 0 to m & minus; 1).
in the only line of the input data is given two integers 1
weekend. Wit the response to the response to the response Task.
Exploration Entry 179 57 Conclusion 22
b = 0 a = list ( map ( int , input (). Split ()) b = pow (a [ 1 ], a [ 0 ] - 2 , a [ 0 ]) if pow (a [ 1 ], a [ 0 ] - 2 , a [ 0 ]) == 0 : print (- 1 ) else : Print (b) Pre> Ответов пока нет.
Войдите чтобы оставить ответ