Skip to content

Instantly share code, notes, and snippets.

@meriy100
Created April 16, 2019 08:06
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 meriy100/f55eca50ea87d7cbbea60e1afba23496 to your computer and use it in GitHub Desktop.
Save meriy100/f55eca50ea87d7cbbea60e1afba23496 to your computer and use it in GitHub Desktop.
ruby FizzBuzz.rb
require 'tempfile'
Tempfile.create('fizzbuzz-') do |tmp|
str = "99 108 97 115 115 32 65 114 114 97 121 10 32
32 100 101 102 32 128150 10 32 32 32 32
40 102 105 114 115 116
46 111 114 100 32
47 32 108 97
115 116 46 111
114 100 41 46
99 104 114 10 32 32 101
110 100 10 10 32 32 97 108 105
97 115 32 128147 32 109 97 112 10
32 32 97 108 105
97 115 32 128148 32 106 111 105
110 10 101 110 100 10"
File.write(tmp.path,str.split(' ').map{|i|i. to_i.chr("UTF-8") }.join)
load tmp.path
1.upto(gets.to_i) do |n|
puts([['πŸ’–', "ά¦"], ['🌈', 'Σ€'], ['🍷', 'И'], ['🍷', 'И'], ['πŸ‘™', "ή”" ], ['πŸ‘™', 'Ρ„'], ['🍷', 'И'], ['🍷', 'И'], [ '🍻', 'ㇲ']]
.πŸ’“(&:πŸ’–)
.πŸ’”[ i = n ** 4 % -15, i + 13] || n)
end
end
@meriy100
Copy link
Author

$ ruby FizzBuzz.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment