class INPUT: def __init__(self): from sys import argv if argv[-1] in ["./Main.py","prog.py","Main.py"]:#Atcoder:./Main.py,Wandbox:prog.py,yukicoder:Main.py self.l=open(0).read().split()[::-1] else: self.l=open("_input.txt",mode="r").read().split()[::-1] self.length=len(self.l) return def stream(self,k=1,f=int,f2=False): assert(-1 return left all eclipse 等では_input.txtを使うこと。 listを変数で受け取るとき、必ずlistをTrueにすること。 """ from random import randint def is_prime(n): if n==1: return 0 for i in range(40): if pow(randint(1,n-1),n-1,n)!=1: return 0 return 1 def main(): n=pin(1) a=pin(0) for i in range(n): print(a[i],is_prime(a[i])) return main()