Maximum and minimum not from all (Python)
Problem
Given an integer array of 40 elements. Array elements can take integer values from 1 to 10000 inclusive. Describe in natural language or in one of the programming languages an algorithm that allows you to find and display the largest of the array elements, the octal notation of which contains at least three digits and ends in 5. If there are no such numbers, you need to print the answer 0.