Skip to main content
1 of 3
jimmy23013
  • 37k
  • 6
  • 77
  • 148

#CJam, size 34, by Dennis

"!,wcoo tkea"Jb" n heyre srwe"Bbma

Other solutions:

"newk,r !ywsre"Bb" e cto aeho"Jbma
"erwy !tro"Jb" knsecew,ho"Bbma  ea
"rese ohro  cn"Bb"!ew,a yektw"Jbma
"sr  k!oore,"Bb"nyeewtwch"Jbma  ea
"nwetkhs yr "Bb"o!eerc w,"Jbma eao
"!,wcoo tkea"Jb" n heyre srwe"Bbma

This is mainly based on Martin Büttner's idea. First assume the solution is either "..."Jb"..."Bbma or "..."Bb"..."Jbma. Then find some small fractions p/q whose tangent value is rounded to that number. Try every k and search for a pair of string which can be decoded into kp and kq. The search program is proven fast in cracking of the previous answer.

At first we have overestimated the probability and started with only two pairs of p and q. Nothing is found. But finally I changed the program to enumerate all possible ps and qs, and it worked.

There should be other ways to generate the two numbers other than kp, kq. But I don't know where to start the search in that case.

jimmy23013
  • 37k
  • 6
  • 77
  • 148