ac-library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub habara-k/ac-library

:heavy_check_mark: test/modlog.test.cpp

Depends on

Code

#define PROBLEM "https://judge.yosupo.jp/problem/discrete_logarithm_mod"

#include <atcoder/math_enhanced>
#include <iostream>

using namespace atcoder;
using namespace std;

int main() {
    int t; cin >> t;
    while (t--) {
        int x, y, m; cin >> x >> y >> m;
        cout << mod_log(x, y, m) << endl;
    }
}
#line 1 "test/modlog.test.cpp"
#define PROBLEM "https://judge.yosupo.jp/problem/discrete_logarithm_mod"

#include <atcoder/math_enhanced>
#include <iostream>

using namespace atcoder;
using namespace std;

int main() {
    int t; cin >> t;
    while (t--) {
        int x, y, m; cin >> x >> y >> m;
        cout << mod_log(x, y, m) << endl;
    }
}
Back to top page