One Signal N with a number between 1 and 101 (I didn't like 0 because then I can't see whether the signal is present anywhere or not)
The circuit uses the fact that combinators run slower the less power they have. So I connect one solar panel to entities such that a bit more than 60kW is used. During the day the combinator has enough power and runs on 60ticks. If solar only produces 30kW during dawn the combinator will run only 30 calculations. The transform is almost linear, less power -> less ticks on the combinator.
Meanwhile the main calculation (image on the right side) must always have enough power (main base power, or uninterrupted power supply)
18 combinators (5 constant, 4 arithemtic, 9 decider)
2 electric poles (small do, if using medium make sure the one with the solar panel doesn't connect anywhere)
1 Solar panel
Additionally if you want the calculation on an uninterrupted power supply:
1 solar panel + 1 accumulator