Using KISS :)
http://en.wikipedia.org/wiki/KISS_principle

Ps: is not an offensive message


Wladimir Araujo Tavares
*Federal University of CearĂ¡ <http://lia.ufc.br/%7Ewladimir/>
Homepage <http://lia.ufc.br/%7Ewladimir/> |
Maratona<https://sites.google.com/site/quixadamaratona/>|
*




On Fri, Sep 28, 2012 at 6:17 PM, icy` <vipe...@gmail.com> wrote:

> why not just brute force this?  one little array contains [a, (a+d),
> (a+2d), (a+3d), (a+4d) ], which is then filtered so that none of those are
> multiples of another.
>
> Then set a count variable to m-n+1.  Check all numbers in range against
> your little array, decrementing count and breaking out if a divisible num
> is found.  In Ruby, screenshot so that syntax highlighting remains.
>  (comments start with #  )
>
> [image: Inline image 1]
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

<<image.png>>

Reply via email to