Skip to content

Instantly share code, notes, and snippets.

@madogiwa0124
Last active March 28, 2017 15:42
Show Gist options
  • Save madogiwa0124/a1c53113a02f2bd187f7128d0b9c9d7e to your computer and use it in GitHub Desktop.
Save madogiwa0124/a1c53113a02f2bd187f7128d0b9c9d7e to your computer and use it in GitHub Desktop.
ズンドコキヨシ with Ruby
z,d = words = ["ズン","ドコ"]
fin_words = [z,z,z,z,d]
ans = []
while ans.join != fin_words.join
ans = []
fin_words.length.times{ ans << fin_words.sample }
end
puts "#{ans.join}、キ・ヨ・シ!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment