Skip to content

Conversation

@iisat
Copy link
Owner

@iisat iisat commented Nov 7, 2018

No description provided.

Copy link

@Dzhoker1 Dzhoker1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Оставил комментарии по коду

@@ -0,0 +1,23 @@
ans2 = ans3 = ans4 = ans5 = ans6 = ans7 = ans8 = ans9 =0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отлично, но не оптимально по объёму написания кода

@@ -0,0 +1,14 @@
import random
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отлично

@@ -0,0 +1,19 @@
import random
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отличное решение

array.append(random.randint(0, RANGEMAX))

# Определяем массив счетчиков
countarray = [0] * (RANGEMAX + 1)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Представил задачу, где в массиве 10 чисел в диапазоне от нуля до миллиарда.
Неудачный алгоритм получается )))


#Выводим исходный массив
print(array)
minmax = RANGEMIN
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Алгоритм работает, когда вы точно знаете диапазон значений массива

@@ -0,0 +1,26 @@
import random
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отлично

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants