350

Pseudo-Random Numbers
Type: Number Theory  
Diff: 4.0

Tricks

You need to calculate numbers until any repetition occurs. For preventing the time limit I use an array whose index is the number and element is the order by which it comes. For example, array[] is that array. Z = 5, L = 5, M = 12 and Seed is 4. Then,

 

Array[4]=1

Array[9]=2

Array[8]=3

Array[1]=4

Array[0]=5
and so on.

Related Problems & Topics

408 Uniform Generator   

If you have any advice, complements 

or proposal, please  Send mail to Author

Submit

 

1