Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oleander/projecteuler-rb
My own solutions in Ruby for project Euler
https://github.com/oleander/projecteuler-rb
Last synced: 4 days ago
JSON representation
My own solutions in Ruby for project Euler
- Host: GitHub
- URL: https://github.com/oleander/projecteuler-rb
- Owner: oleander
- Created: 2011-12-23T01:15:05.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-12-30T20:45:31.000Z (about 13 years ago)
- Last Synced: 2024-11-20T20:12:02.294Z (2 months ago)
- Language: Ruby
- Homepage: http://projecteuler.net/
- Size: 109 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Project Euler in Ruby
## Philosophy
Slow(ish) and compact instead of fast and spacey.
## Example of compact code?
Here is my solution to the first assignment.
``` ruby
(0...1000).select {|n| [3, 5].map{|i| n % i}.any?(&:zero?)}.inject(:+)
```1. Slow? Probably.
2. Compact? Yes, sort of.
3. Readable? Nope.