Created
May 17, 2020 03:01
-
-
Save webuilder240/8dba0e43116d1d434f5ddbfe416c4887 to your computer and use it in GitHub Desktop.
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
# https://twitter.com/i4mwh4ti4m/status/1258768719972454400?s=21 | |
# しすすすすしおおおすし | |
# 11文字目でおすしがでました | |
l = %w(お す し) | |
result = "" | |
expect = l.join("") | |
begin | |
result += "#{l.sample}" | |
end while !result.include?(expect) | |
puts result | |
puts "#{result.length}文字目で#{expect}が出ました" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment