Skip to content

Learning Scala by solving a series of challenging mathematical/computer programming problems.

License

Notifications You must be signed in to change notification settings

bedwards/scala-leonhard

Repository files navigation

scala-leonhard

Learning Scala by solving a series of challenging mathematical/computer programming problems.

Problem 1

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.

% docker-compose run scala scala One.scala 3 5 10
23

Problem 3

The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143?

% docker-compose run scala scala Three.scala 13195
n=13195, factor=5
n=2639, factor=7
n=377, factor=13
n=29, factor=29
Some(29)

About

Learning Scala by solving a series of challenging mathematical/computer programming problems.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages