The following Coffeescript produces the number 2014 by loading the hexidecimal value 0xFBC and zero shifting it 1 bit to the right. In Coffeescript, "no" = 0 and "on"=1.


Is there a shorter way to load the hex number without using a zero? (I need 10 rep points to answer in the contest).

  • \$\begingroup\$ I didn't see any other code example in the 2014 contest that shifted 0xFBC right or divided it by 2, so why is this approach a duplicate? In another language, this vector may even be coded more compactly than 14 bytes. \$\endgroup\$
    – user13964
    Jan 7, 2014 at 14:52
  • \$\begingroup\$ Try out my Coffeescript solution \$\endgroup\$
    – user13964
    Jan 7, 2014 at 15:10
  • \$\begingroup\$ It's marked as duplicate because you posted it as a question. It's considered a "duplicate" question, not an answer. \$\endgroup\$
    – Joe Z.
    Jan 7, 2014 at 17:44
  • \$\begingroup\$ Got it, thanks! Obviously, this post belongs in your thread. I had no other option but to post as I did, though, having only 1 noob rep point. I guess I could have remained silent. \$\endgroup\$
    – user13964
    Jan 8, 2014 at 6:05
  • \$\begingroup\$ A bunch of people posted answers as comments. Since your solution is less than 600 characters long, you could have done that. \$\endgroup\$
    – Joe Z.
    Jan 8, 2014 at 7:13


Browse other questions tagged or ask your own question.