Upgrade to Pro — share decks privately, control downloads, hide ads and more …

【2018/05/08 Otemachi.rb#6】Rubyで取り組むProject Eular

【2018/05/08 Otemachi.rb#6】Rubyで取り組むProject Eular

2018/05/08 Otemachi.rb#6でのLTです

Shu OGAWARA

May 08, 2018
Tweet

More Decks by Shu OGAWARA

Other Decks in Technology

Transcript

  1. +-$ n ( '(@expajp) – 3 – Ruby/Rails*1 – 

      &% – #)!" – .%,
  2. Project EularRuby n 1978/- 6: – 78/2,6+1.8000+ n %' –

    ('$8;< – 45#/% &#&'7   – Write Code Everyday " – )*&! 6 03 
  3. 

  4.      n    –

    String#each_char •  1   – Enumerable#inject • 
  5. 

  6.      n 100% (  #

    – Enumerable#combination(n) • &) n' (  " – Prime.instance.prime? (prime$) • ( !
  7.  n Problem 4 !" $% &  #! 

    . 2'" ! ,   9009 = 91  99 . , 3'" !# .
  8. 

  9.  n Project Eular *)$ /F+"- n Ruby,-(!3. – Enumerable&'*:

    – ,-(! ; ? 48  – RubyA5=2796  • E<%  DC n Rails #BG@0>1