摘要:
import math def isPrime(num): if num==5 or num==7: return True elif num%5==0 and num%7==0: return False else: for n in range(3,int(math.sqrt(num))+1): ... 阅读全文
摘要:
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given s 阅读全文