Home > Back-end >  Please bosses have a solution
Please bosses have a solution

Time:05-22

Lucky number is named after the mathematician wu ram in Poland, it USES a similar
to generate prime number"Method of screening" generated, first starting from 1 write natural number 6,... ,
1 is the first lucky number, we start with the number 2, put all the serial number can be
Divided exactly by 2 item deletion in: 1 3 5 _ _ _ 7 _ 9... To tighten them,
To order, as follows: 1 3 5 July 9... , at this time, 3 for a lucky number, 2
Then put all the serial number of the location of the number can be divided exactly by 3 delete, note that the serial number is a
Buy, not the number itself can be divided exactly by 3!!!!! Delete should be 5, 11, 17
. , 7 for 3 lucky Numbers at this point, and then delete the serial number can be 7
Divisible (19 33, 6... ), similar to last the rest of the sequence: 1, 3, 7, 9, 13,
15, 21, 25... , note: please according to the number of lucky generation rules, writing routine
Order within 100 lucky number, the output of a line, each behind a digital output
A space,

CodePudding user response:

Homework to do well

CodePudding user response:

Get an array, put the qualified in front, finally taking out in front of the Numbers is ok,

CodePudding user response:

  • Related