Simple weigher

A question about this machine

Code