Skip to content

Instantly share code, notes, and snippets.

@webuilder240
Created May 17, 2020 03:01
Show Gist options
  • Save webuilder240/8dba0e43116d1d434f5ddbfe416c4887 to your computer and use it in GitHub Desktop.
Save webuilder240/8dba0e43116d1d434f5ddbfe416c4887 to your computer and use it in GitHub Desktop.
# 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