What does it mean to draw lots for Sun Kangying Snow?

Sun Kang in the Jin Dynasty could not read books at night because his family was poor and had no money to buy lamp oil. He felt very sorry for wasting his time. One day, it was snowing outside. When I woke up in the middle of the night, I saw a beam of light coming in from the window. It turned out to be a reflection of heavy snow. He got up and read under the lamp. After every night's hard work, he finally became a well-read person.