diff --git a/execute.py b/execute.py index 57f1eec..159d305 100644 --- a/execute.py +++ b/execute.py @@ -32,7 +32,7 @@ async def main(a_start, b_end, sigma): # Uruchomienie głównej funkcji if __name__ == "__main__": - sigma = 510104288 + sigma = 230531719 a = 1 - b = 7000 + b = 10000 asyncio.run(main(a, b, sigma)) diff --git a/main.py b/main.py index d5b8f39..218a456 100644 --- a/main.py +++ b/main.py @@ -27,7 +27,7 @@ async def compute(data: ComputeInput): b_end = int(data.b) sigma = data.sigma - num_chunks = 8 + num_chunks = 16 chunk_size = (b_end - a_start + 1) // num_chunks ranges = [(a_start + i * chunk_size, min(a_start + (i + 1) * chunk_size - 1, b_end)) @@ -37,7 +37,7 @@ async def compute(data: ComputeInput): futures = [executor.submit(run_compute, a, b, sigma) for a, b in ranges] results = [f.result() for f in futures] - return sum(results) + return sum(results) % 999999937 if __name__ == "__main__": uvicorn.run(app, host="0.0.0.0", port=8000)