You are viewing a single comment's thread. Return to all comments →
#python for x in range(int(input())): n=int(input()) flag=True if n<2: flag=False elif n==2: flag=True elif n %2==0: flag=False else: for x in range(3, int(n**.5)+1, 2): if n %x==0: flag=False break if flag: print("Prime") else: print("Not prime")
Seems like cookies are disabled on this browser, please enable them to open this website
Day 25: Running Time and Complexity
You are viewing a single comment's thread. Return to all comments →