Skip to content

Instantly share code, notes, and snippets.

@epidemian
Created March 31, 2014 03:35
Show Gist options
  • Save epidemian/9884787 to your computer and use it in GitHub Desktop.
Save epidemian/9884787 to your computer and use it in GitHub Desktop.
f=IO. read(
__FILE__) .gsub(/[^
\s]/x,?#);s= $**'loves';s
.upcase!;i=1;a =s.chars.uniq.
map{|c|s.count(c)};loop{b='';
b<<"#{a.shift.to_i+a.pop.to_i
}"while(a.any?);d=b.to_i;a=
b.chars;d<101&&abort(d>
50?f:f.gsub(/^.*/){
|s|i=13+i%3;s[\
i...i]=040.
chr*3;s
})}
V
s=($**'loves').upcase
a=s.chars.uniq.map{|c|s.count c}
loop{b=''
b<<"#{a.shift.to_i+a.pop.to_i}"while a.any?
b.to_i<101&&abort(b)
a=b.chars}
@epidemian
Copy link
Author

Usage:

ruby ♥.rb <name> <name>
ruby ♥_num.rb <name> <name>

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