blob: c54a0195de36326b8b01782a1f183a25e0aece15 [file] [log] [blame]
Adrià Vilanova Martínez4caba882021-10-06 21:51:23 +02001#include <iostream>
2
3int main() {
4 int p = 43;
5 for (int i = 1; i < p; ++i) {
6 for (int j = 1; j < p; ++j) {
7 if ((i*j) % 43 == 1) {
8 std::cout << i << "^{-1} = " << j << std::endl;
9 break;
10 }
11 }
12 }
13}