refine the lottery algorithm to reduce its computational complexity

Dependencies:   C12832 mbed

Fork of app_board-Lottery by WuLung Hsu

no such method: tip