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 6709 ms 12 MB
Python carmichael_00 :heavy_check_mark: AC 41 ms 12 MB
Python example_00 :heavy_check_mark: AC 27 ms 12 MB
Python hack_issue996_00 :heavy_check_mark: AC 28 ms 12 MB
Python less_1000000000_00 :heavy_check_mark: AC 528 ms 12 MB
Python prod_two_prime_00 :heavy_check_mark: AC 1383 ms 12 MB
Python random_00 :heavy_check_mark: AC 1031 ms 12 MB
Python random_01 :heavy_check_mark: AC 1010 ms 12 MB
Python random_02 :heavy_check_mark: AC 1142 ms 12 MB
Python small_00 :heavy_check_mark: AC 438 ms 12 MB
Back to top page