mirror of
https://github.com/javalsai/aoc.git
synced 2026-01-13 01:19:59 +01:00
add: d05 & debug utils
- includes a script to generate a 2GB big challenge - added utils to internally time functions with minimal overhead - add functionality to tester.rs
This commit is contained in:
22
2025/05/gen.py
Normal file
22
2025/05/gen.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import random
|
||||
|
||||
MAX=(2**64)-1
|
||||
RANGES=1000000
|
||||
IDS=100000000
|
||||
|
||||
list_of_ids = []
|
||||
|
||||
with open('2025-huge.txt', 'a') as file:
|
||||
for x in range(1000):
|
||||
num1 = random.randint(1, MAX)
|
||||
num2 = random.randint(1, MAX)
|
||||
if num1 > num2:
|
||||
tmp = num1
|
||||
num1 = num2
|
||||
num2 = tmp
|
||||
file.write(f'{num1}-{num2}\n')
|
||||
file.write('\n')
|
||||
for x in range(IDS):
|
||||
num = random.randint(2, MAX-1)
|
||||
if not (num in list_of_ids):
|
||||
file.write(f'{num}\n')
|
||||
Reference in New Issue
Block a user