@anonymous/

ClosedNormalMarmot

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import time
from random import randint


def get_nums(searchs, numbers):
	for s1, s2, s3 in searchs:
		for num1, num2, num3 in numbers:
			if((num1 - search_range) < s1 < (num1 + search_range) and
				(num2 - search_range) < s2 < (num2 + search_range) and
				(num3 - search_range) < s3 < (num3 + search_range)):
				yield (num1, num2, num3)

numbers = []
searchs = []
search_range = 1

for i in range(0, 9999):
	numbers.append((randint(0, 100), randint(0, 100), randint(0, 100)))
	searchs.append((randint(0, 100), randint(0, 100), randint(0, 100)))

start = time.time()
results = get_nums(searchs, numbers)
print(list(results))

print('Time: %.2f' % (time.time() - start))