Last active
August 21, 2019 14:09
-
-
Save Chirimen-Jako/8e3736d5a6c4d7c55f19495befa0ae9c to your computer and use it in GitHub Desktop.
おっぱいそんちくびんびん♪ (Crystal)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/crystal | |
# | |
# おっぱい.cr | |
# | |
# 2019/08/18: initial release | |
# | |
# Ubuntu 18.04.2 LTS (Bionic Beaver) | |
# | |
# Crystal 0.30.1 [5e6a1b672] (2019-08-12) | |
# LLVM: 4.0.0 | |
# Default target: x86_64-unknown-linux-gnu | |
# | |
# Dedicated to shirasu | |
# https://gist.github.com/8q/a5331c6ef8a205b32125 | |
# | |
real_str = "おっぱいそんちくびんびん" | |
oppai_elements = ["おっ", "ぱい", "そん", "ちく", "びん", "びん"] | |
test_str = "" | |
count = 0 | |
while test_str != real_str | |
count += 1 | |
num_list = [0, 1, 2, 3, 4, 5].shuffle | |
test_str = num_list.map {|i| oppai_elements[i]} .join | |
print "#{count} #{test_str}\n" | |
end | |
print "おめでとうございます!" + " " | |
print "あなたは#{count}回目に#{real_str}しました。\n" | |
print "end\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment