3/7 How do I solve for a and b (they are strings)?
f(a) = 2.90171130144904e+22
f(b) = 24,386,094,146,700
where
f(x) = y=1;for(i=0; i<x.length; i++) {y *= x.charCodeAt(i);}
\_ If you want to find nice-looking strings, you could do a
dictionary search -- try encoding lots of different plausible
strings until you find some that give you the values you want.
I like "paidsurveys" and "user567". --mconst
\_ if you were more than a half-wit, you would have realized that
there are infinitely many solutions, or at least a lot, depending
on what alphabet your strings are over
\_ As per above, there _are_ a lot of solutions (trivially, a finite
number since the above in all likelihood is over ASCII). However
that doesn't mean that this is _completely_ impossible. You _do_
however need to explain more about the problem. What do you know
about a and b? What kind of characters can they possibly contain?
Upper-case letters? Lower-case letters? Punctuation? Digits?
Control characters? "Foreign"/"special" characters (a la extended
ASCII, 0x80 and up)? What are the strings supposed to be? Words?
Do they follow some interesting statistical distribution? ...Or,
alternatively, do you need a _specific_ solution out of many,
or will any string that f returns those values on suffice?
Also, you make your job _far_ harder by giving floating point
forms for the first one; since you're missing several digits from
the end of the decimal representation, you'll effectively have
trying to get into? -alexf
to make up for it by considering all possible values for them
(making your job literally 10,000,000 times harder under most
circumstances). Also, since the format of your statement suggests
that this is javascript, which shittily-secured porn site are you
trying to get into? We want some too =) -alexf
\_ P.S. if said strings don't contain extended ascii chars, I can
at least tell you that b contains exactly one "e", and no "a"'s,
"g"'s, "k"'s, "m"'s, or "q"'s. See also: prime factorization =)
\_ of course, it should go without saying that mconst is
infinitely smarter than i, and you should just go read his
post above instead. -alexf |