Lottery Program, find your ideas .. write a winning program for mobile. the winning levels are 1 to 6 respectively corresponding to different prizes & nbsp; the term is three months. The condition is that a user can only win a prize from four to six in three months. why ?. ------ Solution ------------------ The idea is to save multiple mobile phone numbers and read the results cyclically. ------ solution ---------- lucky draw program, ask for ideas ..
Write a winning program for mobile. the winning levels are 1 to 6 respectively corresponding to different prizes.
The term is three months. The condition is that a user can only win a prize from four to six in three months. The user can have multiple chances to win the prize ?.
------ Solution --------------------
The idea is to save multiple mobile phone numbers and read the results cyclically.
------ Solution --------------------
If the same number can be repeated, you should save all participating numbers
During each lucky draw, the winner can be selected through random and equidistance sampling. the direct rand is also acceptable, but the efficiency is not high, and the food price should be huge.
In the out-of-the-box and out-of-the-box mode, you do not need to save all participating numbers, but do a small probability processing for the prize pool.
For example, if there are 10 prizes rand (0, 100000) <10, the winning rate will be one in ten
It is easy for a user to win a prize only once in three months. you only need to keep the winning number for three months, and you can judge it.
------ Solution --------------------
Ajax
Record processing on the server
------ Solution --------------------
Who determines the probability of winning?
------ Solution --------------------
Since you are not sure how many mobile phones are coming back to participate .. Only time periods can be determined .... The time when each award was last won .. Then the time is not enough .....
------ Solution --------------------
The first prize is ITOUCH. now every IPAD/iPhone 4S is embarrassed to say the lucky draw.
------ Solution --------------------
Every day... 300 times a mobile phone? You have another record .....
After writing the post code, we can find the bug and file a lawsuit with mobile ....
Discussion
Reference:
The idea is to save multiple mobile phone numbers and read the results cyclically.
I forgot to mention that there are nine Jiugong cells on the page that can be clicked up to 300 times a day to see if I have won the prize ~
------ Solution --------------------
Discussion
Every day... 300 times a mobile phone? You have another record .....
After writing the post code, we can find the bug and file a lawsuit with mobile ....
Reference:
Reference:
The idea is to save multiple mobile phone numbers and read the results cyclically.
I forgot to mention that there are nine Jiugong cells on the page that can be clicked up to 300 times a day to see if I have won the prize ~
------ Solution --------------------
A normal rand is enough.