Hide
Problem A
Shanks' Baby Step Giant Step
Languages
en
is
Implement the baby-step giant-step algorithm to solve
Input
Input is three lines. The first line contains the prime
Output
Output one line with any valid solution
Sample Input 1 | Sample Output 1 |
---|---|
367 2 137 |
75 |
Sample Input 2 | Sample Output 2 |
---|---|
367 2 179 |
no solution |