0
\$\begingroup\$

This question already has an answer here:

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.

+no+"xFBC">>on

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

\$\endgroup\$

marked as duplicate by John Dvorak, manatwork, J B, Peter Taylor, Gareth Jan 7 '14 at 10:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • \$\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 '14 at 14:52
  • \$\begingroup\$ Try out my Coffeescript solution \$\endgroup\$ – user13964 Jan 7 '14 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 '14 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 '14 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 '14 at 7:13

Browse other questions tagged or ask your own question.