Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我基本上需要获得用户输入:
gets.chomp("input?")
然后将给定的输入转换为二进制。
那是我不明白的部分。:(
试试这个。
a = gets.chomp puts a.each_byte.map {|y| sprintf "%08b", y}.join " "