Skip to content

Instantly share code, notes, and snippets.

@sifue
Last active October 25, 2017 13:23
Show Gist options
  • Save sifue/8a15528d584673f5e0709c8c3ae1a509 to your computer and use it in GitHub Desktop.
Save sifue/8a15528d584673f5e0709c8c3ae1a509 to your computer and use it in GitHub Desktop.
Rubyでのプロジェクトオイラー問題1の答え
(1..999).select{|n| n % 3 == 0 || n % 5 == 0}.inject{|sum, i| sum + i}
@sifue
Copy link
Author

sifue commented Oct 25, 2017

間違ってたので更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment