7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RubyでもSTAP細胞を探したい

Last updated at Posted at 2014-06-04

シダに乗り遅れたのでとりあえずRubyで
かぶってませんように
回数数えてないとレギュレーション違反かもしれないのでカウンタ追加した

discovery.rb
atoz = ("A".."Z").to_a

counter = 0
loop do
  cell = ""
  4.times { cell += atoz.sample }
  counter += 1
  print cell+"細胞"
  if cell == "STAP"
    puts "#{counter}回目で陽性かくにん!"
    puts "よかった☆"
    break
  end
end

7
8
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?