<code class="language-python">from math import sqrt def getPrime(n): if (n!=2) & (n&1==0) : return False for i in range(3,int(sqrt(n))+1,2): if n%i == 0: return False return True def primePosition(x): count = 0 if x==2: return 1 if (x>1) & getPrime(x): for i in range(3, x,2): if getPrime(i): count += 1 return count + 2 return count </code>
时段 | 个数 |
---|---|
{{f.startingTime}}点 - {{f.endTime}}点 | {{f.fileCount}} |