library

This documentation is automatically generated by competitive-verifier/competitive-verifier

View the Project on GitHub hidehic0/library

:heavy_check_mark: tests/is_prime.py

Depends on

Code

# competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/primality_test
from libs.math_func import is_prime
from libs.standard_input import *
from libs.yn_func import *

Q = ii()

while Q:
    N = ii()
    YN(is_prime(N))
    Q -= 1

Test cases

Env Name Status Elapsed Memory
Python all_prime_00 :heavy_check_mark: AC 6289 ms 12 MB
Python carmichael_00 :heavy_check_mark: AC 34 ms 12 MB
Python example_00 :heavy_check_mark: AC 29 ms 12 MB
Python hack_issue996_00 :heavy_check_mark: AC 29 ms 12 MB
Python less_1000000000_00 :heavy_check_mark: AC 253 ms 12 MB
Python prod_two_prime_00 :heavy_check_mark: AC 943 ms 12 MB
Python random_00 :heavy_check_mark: AC 686 ms 12 MB
Python random_01 :heavy_check_mark: AC 691 ms 12 MB
Python random_02 :heavy_check_mark: AC 689 ms 12 MB
Python small_00 :heavy_check_mark: AC 217 ms 12 MB
Back to top page