0 of 38 问题 completed
问题:
You have already completed the 测验 before. Hence you can not start it again.
测验 is loading…
You must sign in or sign up to start the 测验.
您必须先完成以下操作:
0 of 38 问题 answered correctly
Your time:
时间已经过去了
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
import math
def getPrime(n):
for x in range(2,n+1):
x_sqrt = ①
for prime in primeList:
if ②
primeList.append(x)
break
if ③
break
else:
primeList.append(x)
return primeList
m=int(input(“请您输入一个整数n:”))
print(‘您输入的区间1-n中素数分别是:’+ ④ )+’,总共是’+str(len(primeList))+’个素数!’)
点击检查查看答案
点击检查查看答案
COUNT=0
def perm(n,begin,end):
global COUNT
if ①
print (n)
COUNT +=1
else:
i=begin
for num in ② :
n[num],n[i]=n[i],n[num]
③
n[num],n[i]=n[i],n[num]
arr = input(“1-n的第1个排列:”)
n = [int(n) for n in arr.split()]
④
点击检查查看答案