Skip to main content
deleted 25 characters in body
Source Link

Crystal, 203 194 187 186 184184 163 bytes

o=""
v=c=0
l=1
ARGV[0]ARGV[v=c=0].each_char{|a|r=/#{a}/
"aeiouy"=~r&&(v=x=1)||(c=v)
o += ao+=a if l>0||xc<2||x
o += c>0&&(x&&break||(o+=(i="pgtvkgbqrzdfs"=~r)?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break)}
p o+o[-2..-1]

Crystal, 203 194 187 186 184 bytes

o=""
v=c=0
l=1
ARGV[0].each_char{|a|r=/#{a}/
"aeiouy"=~r&&(v=x=1)||(c=v)
o += a if l>0||x
o += (i="pgtvkgbqrzdfs"=~r)?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break}
p o+o[-2..-1]

Crystal, 203 194 187 186 184 163 bytes

o=""
ARGV[v=c=0].each_char{|a|r=/#{a}/
"aeiouy"=~r&&(v=x=1)||(c=v)
o+=a if c<2||x
c>0&&(x&&break||(o+=(i="pgtvkgbqrzdfs"=~r)?"bcdfgkpqrstvz"[i]: a))}
p o+o[-2..-1]
added 14 characters in body
Source Link

Crystal, 203 194 187 186186 184 bytes

o=""
v=c=0
l=1
ARGV[0].each_char{|a|"aeiouy"=~|a|r=/#{a}/&&
"aeiouy"=~r&&(v=x=1)||(c=v)
o += a if l>0||x
o += (i="pgtvkgbqrzdfs".index(a)i="pgtvkgbqrzdfs"=~r)?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break}
p o+o[-2..-1]

Crystal, 203 194 187 186 bytes

o=""
v=c=0
l=1
ARGV[0].each_char{|a|"aeiouy"=~/#{a}/&&(v=x=1)||(c=v)
o += a if l>0||x
o += (i="pgtvkgbqrzdfs".index(a))?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break}
p o+o[-2..-1]

Crystal, 203 194 187 186 184 bytes

o=""
v=c=0
l=1
ARGV[0].each_char{|a|r=/#{a}/
"aeiouy"=~r&&(v=x=1)||(c=v)
o += a if l>0||x
o += (i="pgtvkgbqrzdfs"=~r)?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break}
p o+o[-2..-1]
added 8 characters in body
Source Link

Crystal, 203 194 187187 186 bytes

o=""
v=c=0
l=1
ARGV[0].each_char{|a|"aeiouy"=~/#{a}/&&(v=x=1)||(c=v)
o += a if l==1||xl>0||x
o += (i="pgtvkgbqrzdfs".index(a))?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break}
p o+o[-2..-1]

Crystal, 203 194 187 bytes

o=""
v=c=0
l=1
ARGV[0].each_char{|a|"aeiouy"=~/#{a}/&&(v=x=1)||(c=v)
o += a if l==1||x
o += (i="pgtvkgbqrzdfs".index(a))?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break}
p o+o[-2..-1]

Crystal, 203 194 187 186 bytes

o=""
v=c=0
l=1
ARGV[0].each_char{|a|"aeiouy"=~/#{a}/&&(v=x=1)||(c=v)
o += a if l>0||x
o += (i="pgtvkgbqrzdfs".index(a))?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break}
p o+o[-2..-1]
deleted 1 character in body; added 6 characters in body
Source Link
Loading
Source Link
Loading