Bulb interview question

A simple energy bill calculation test.