Dynamo Algorithmic Problem

Dear Experts,
I want to perform a simple operation but I am not satisfied with the result. Any suggestion will be highly appreciated.

Short Problem Description:
When I enter “40” as an input, result expected to be list with two outputs (32-Channel NVR,16-Channel NVR)
However, as you can see from the screenshot the output is only one (32-Channel NVR)

Hi Roman, welcome!
Here are two ways - same as yours which is working. Perhaps try changing the IN variable to something else. Python version using bisect which places the number to the left in the list based on sorted values and returns the index which you can use to get the required value

2 Likes

Dear Mike,
Thanks for your prompt feedback. I checked your first recommendation however not get result. If I write “12” for example the result (less than 26) is shown in duplicate instead of a single copy. Can you explain me?
Algorithm Problem

1 Like

Hi I guess the issue is line 3 in the codeblock

2 Likes

Hi, yes, thank you, but I want to get a double response if the input is 40 as shown above, and single if the input is 12 for example

2 Likes

arhh i see could list unique item work ?

2 Likes

Yes, it works, thank you

2 Likes

and in codeblock if you want

3 Likes

Thank you very much for you help

2 Likes