3 ms·
There is a bug : N = 1000000 # Total numbers to check chunk_size = N // num_vcpus tasks = [(i * chunk_size + 1, (i + 1) * chunk_size) for i in range(num_vcp
by GistNoesis 2y ago
There is a bug :
N = 1000000 # Total numbers to check
chunk_size = N // num_vcpus
tasks = [(i * chunk_size + 1, (i + 1) * chunk_size) for i in range(num_vcpus)]
When num_vcpus = 12, chunksize = 83333, and 12*chunk_size = 999996, therefore we don't check the last four numbers.
- genewitch 2y agothat's okay because that N=1000000 line wasn't part of the spec but at least allowed me to run it as is without loading the rest of the stuff i test.