[QUESTION] Special Numerals
#1

Hy. I am looking for a type of numerals that given any addition between themselves, you never get the same result twice.
Trying to use them as unique identifiers for a 'shopping cart' project.
And i want to be able to tell what the user bought by the sum of all the ids of the products he purchased.

EX:
5 - Shampoo
7 - Soap
11 - Toothpaste

5+7=12 => Shampoo & Soap
5+11=16 => Shampoo & Toothpaste
7+11=18 => Soap & Toothpaste

Anyone got the full list of all those numbers, or atleast a link?
Reply
#2

YSI contains y_bit include which makes this kind of stuff easy.
Reply
#3

I never said it was for sa-mp. That's why i posted here in 'Everything and Nothing'.
Reply
#4

Sorry about that, didn't notice it.

1 2 4 8 16 32 64 128...

x*2

Edit: Actually there might be more of 'em between, but those numbers are in the list fo' sho'.
Reply
#5

Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)