题解 | #牛牛的素数判断#
牛牛的素数判断
https://www.nowcoder.com/practice/81c8387f72824cceb5c955e3dbfd2882
def f(n): # 判断 n 是否为素数 if n == 2: return 'true' for i in range(2,n): if n % i == 0: return 'false' return 'true' times = int(input() ) for i in range(times): n = int(input()) print(f(n))