Author | Message | Time |
---|---|---|
Grok | I ran across a number today that got me thinking ... What number(s) in hex look the same in decimal if you ignore the last digit? 0x224E08 comes pretty close, being 2248200 decimal. What formula would you use to represent all such pairs? | January 3, 2003, 2:20 PM |
warz | Interesting, but fun doesn't capture the emotion of this subject. :P | January 3, 2003, 2:24 PM |
Skywing | 0x33 == '3' ! | January 3, 2003, 7:30 PM |
Yoni | Mathematically, sum(i=0,m)(a(i)16^i) = sum(j=1,n)(b(j)10^j) Sounds like you'd have to solve an annoying exponential equation. Would be easier to check all the numbers from 0 to 0xffffffff (or whatever limit), perhaps after adding some rules (such as "don't check numbers that have digits A-F in their hex representation") to simplify the search. | January 4, 2003, 5:34 AM |