HappyNerd
September 13th, 2010, 07:18 AM
Hi guys,
So i was surfing the net as i went through this program called "ZloyXY", you can download it from here:
http://rapidshare.com/files/418794724/ZloyXY.rar
Using this program the user specifies a rage of numbers and the count of digits and the program generates it.
For example, if you choose the rage to be 10000-20000 and the digits count to 2 the program generates that:
10001
10010
10011
...
52252
52255
52522
52525
and so on...
So that the digit count = the number of digits like- count:2 is XY, count:3 is XYZ...
Anyways, i was wondering how that program works,
at first i thought maybe it scans each number in the range on a loop and checks if it has the specified number of digits the user asked for, if yes- it adds it to the list.
yet i was wrong as i checked and the program generates numbers really fast even with really high ranges (millions) so it cant be scanning all the possible numbers - it somehow generates them.
Does anyone think he knows perhaps how does this algorithm works?
So i was surfing the net as i went through this program called "ZloyXY", you can download it from here:
http://rapidshare.com/files/418794724/ZloyXY.rar
Using this program the user specifies a rage of numbers and the count of digits and the program generates it.
For example, if you choose the rage to be 10000-20000 and the digits count to 2 the program generates that:
10001
10010
10011
...
52252
52255
52522
52525
and so on...
So that the digit count = the number of digits like- count:2 is XY, count:3 is XYZ...
Anyways, i was wondering how that program works,
at first i thought maybe it scans each number in the range on a loop and checks if it has the specified number of digits the user asked for, if yes- it adds it to the list.
yet i was wrong as i checked and the program generates numbers really fast even with really high ranges (millions) so it cant be scanning all the possible numbers - it somehow generates them.
Does anyone think he knows perhaps how does this algorithm works?