ContinueLib

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

View the Project on GitHub Continue765/ContinueLib

:heavy_check_mark: test/library_checker/number_theory_primality.test.cpp

Depends on

Code

#define PROBLEM "https://judge.yosupo.jp/problem/primality_test"
#include <common.hpp>
#include "number_theory/miller_rabin.hpp"

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t;
    cin >> t;
    while (t--) {
        i64 n;
        cin >> n;
        cout << (isPrime(n) ? "Yes" : "No") << '\n';
    }
}
Back to top page