Drill

ProblemsPython › production

Overall equipment effectiveness

mediumproductionPython

OEE multiplies three percentages together into one number that plant managers compare across lines.

oee_score(availability: int, performance: int, quality: int) → int

Solve it in the editor →

Where you start

def oee_score(availability: int, performance: int, quality: int) -> int:
    

Worked examples

CallResult
oee_score(90, 95, 99)85
oee_score(100, 100, 100)100
oee_score(0, 100, 100)0
oee_score(150, 100, 100)100

Hint

Clamp all three first, then multiply and divide by 10000 — adding 5000 before the divide rounds it.

Reference solution in Python
def oee_score(availability: int, performance: int, quality: int) -> int:
    def c(v):
        return max(0, min(100, v))
    n = c(availability) * c(performance) * c(quality)
    return (n + 5000) // 10000

The same problem in another language

More production problems in Python