File tree Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ def factorial_recursive(n):
1919
2020
2121if __name__ == '__main__' :
22- n = 2500
22+ n = 200000
2323 sys .setrecursionlimit (n + 10 )
2424
25- startingTime = time .time ()
25+ comienzo = time .time ()
2626 factorial (n )
27- endTime = time .time ()
28- print (f"Execturion time with bucle\t { endTime - startingTime } " )
27+ final = time .time ()
28+ print (f"Execturion time with bucle\t { final - comienzo } " )
2929
30- startingTime = time .time ()
30+ comienzo = time .time ()
3131 factorial_recursive (n )
32- endTime = time .time ()
33- print (f"Execution time with recusive\t { endTime - startingTime } " )
32+ final = time .time ()
33+ print (f"Execution time with recusive\t { final - comienzo } " )
Original file line number Diff line number Diff line change 1+ def f (x ):
2+ respuesta = 0
3+
4+ for i in range (1000 ):
5+ respuesta += 1
6+
7+ for i in range (x ):
8+ respuesta += 1
9+
10+ for i in range (x ):
11+ for j in range (x ):
12+ respuesta += 1
13+ respuesta += 1
14+
15+ return respuesta
You can’t perform that action at this time.
0 commit comments