blob: d68152600c76cf2d7a780bfb20ec761f38f76e6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
l = [2, 6, 1, 3]
nobles = []
for num1 in l:
greaters = 0
for num2 in l:
if num2 > num1:
greaters += 1
if greaters > num1:
break
else:
if greaters == num1:
nobles.append(num1)
print(nobles)
|