Hi there guys,
Considering your experience, how many keys a pc can scan in 1 second?
No kangaroo, no BSGS, but only random combination.
import time
def calculate_pi(n):
start_time = time.time()
s = 0
for i in range(n):
s += 4.0 * (-1) ** i / (2 * i + 1)
end_time = time.time()
return s, end_time - start_time
n = 1000000
pi, elapsed_time = calculate_pi(n)
print("Pi: %f" % pi)
print("Elapsed time: %f seconds" % elapsed_time)
print("Digit production speed: %f rakam/saniye" % (n / elapsed_time))