pull/1/head
parent
5726fa0cb7
commit
acaf6e5da1
@ -1,5 +1,5 @@
|
|||||||
|
# tady te mam docente
|
||||||
def gp(n):
|
def gp(n):
|
||||||
return [n[0]] + gp([i for i in n[1:] if i%n[0] != 0]) if n else []
|
return [n[0]] + gp([i for i in n[1:] if i%n[0] != 0]) if n else [] # mnohem rychlejsi
|
||||||
|
|
||||||
print(gp(range(2, int(input('zadej cislo : ')))))
|
print(gp(range(2, int(input('zadej cislo : ')))))
|
||||||
|
Loading…
Reference in New Issue