80,000 is quite small for the computer so you could just go through the list one at a time and see how long the match is.

Since they appear to be sorted, you could use a binary search to find the closest match.

Note that if you look at where your number would fit in the sorted list, either the one right above or right below will be the longest match but there could be dozens that tie for longest match.