Skip to content

Instantly share code, notes, and snippets.

@msuarz
Last active December 17, 2015 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msuarz/5625166 to your computer and use it in GitHub Desktop.
Save msuarz/5625166 to your computer and use it in GitHub Desktop.
fs = require 'fs'
process.stdin.resume()
rawData = fs.readSync process.stdin.fd, 100, 0, 'utf8'
@lines = rawData[0].split '\r\n'
re_bin = (x) -> console.log parseInt x
.toString(2)
.split('')
.reverse()
.join('')
, 2
{ lines } = require './read_input_file'
re_bin Number line for line in lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment