Skip to content

Instantly share code, notes, and snippets.

@onlyshk
Created May 12, 2012 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onlyshk/2666966 to your computer and use it in GitHub Desktop.
Save onlyshk/2666966 to your computer and use it in GitHub Desktop.
package proj_euler
object Problem5 {
def solve() : Int ={
val r1 = Range(1, 21).toList
var n = 20
while (true){
val mod = r1.forall(num => (n % num) == 0)
mod match {
case true => return n
case false => n = n +1
}
}
return n
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment