refine the lottery algorithm to reduce its computational complexity

Dependencies:   C12832 mbed

Fork of app_board-Lottery by WuLung Hsu

main.cpp/shortlog@d327dd543579: not found in manifest