Ranking
Original Post
math help with an algorithmic sequence
how can i get a random number from 10000 and compare the numbers to generatored numbers from the winning numbers

example:
Round(Rnd(4335.85)Rnd(10000))
generated numbers

2876
100
4105
1871
2668
4159
4157
813
3722
2879
175
28
2756
851
3348
2324
3564
3253
720
3806
30
3574
3267
4241
2581
1503
4293
1212
759
988
655
2366
1278
1752
3336
2686
594


winning numbers

5417
5558
9288
1209
4674
7064
2716
7100
723
1883
1838
2678
4214
980
5830
5577
6020
7762
5071
1115

ImBoredProdutionz©
Uh, what is the context of this question? Do you literally just want to get it done? Does it matter what language? Do you care about efficiency? Do you just care about the algorithm in an abstract form?


The best way to compare them is to first sort each list, which takes O(nlgn) time, then compare the two lists using something like;
while(a.isMore()&&b.isMore()) {
if(a.peek()==b.peek() print(a.peek());
if(a.peek()>b.peek()) b.pop();
else a.pop();
}
In total this would be O(nlgn+mlgm+n+m)=O(nlgn) which is very efficient. For the record, it can be done in O(n) since the domain is bounded.
<Faint> the rules have been stated quite clearly 3 times now from high staff
a = rand 0-10000
if a = b;
b is any number on the list
(You could also use a = b, elif a = c, elif a = d and manually enter every one of them, but it'll be tedious and ineffective.)
return Win
else
return Nope

Think along those lines in logic, and then code it i whatever language you know.
Now doing recoloring for people not in the clan as-well, PM for more info!
PROUD OWNER OF THORN'S GOOD ENOUGH WRITER AWARD!
You should be more specific with what you want.
[23:23:53] <AndChat|700625> Blue eyes ultimate dragon best card
[23:24:29] <AndChat|700625> You know the one with 3 heads
[23:24:39] <~Lightningkid> just like my dick



[11:35:40] <box> Hampa suck
[11:36:21] <hampa> not the first to tell me that today
Originally Posted by T1G3R5H0T View Post
can you teach me how to make the data into a table
for the comparison

python code:
generatedNumbers = [2876,100,4105,1871,2668,4159,4157,813,3722,2879,175,28,2756]

winningNumbers = [5417,5558,9288,1209]

for a in generatedNumbers:
for b in winningNumbers:
if a==b:
print("{a} wins!")
<Faint> the rules have been stated quite clearly 3 times now from high staff
thanks im trying to make a system for a raffle but im not sure if i can post other websites on the forums
ImBoredProdutionz©
im trying make a squence that will make guessing a number more easy based on others input and the weekly winning numbers

lottery-pot-week-of-9/8/2013-9/15/2013

this is the contest im trying to do it for to see if this concept will work.
ImBoredProdutionz©