Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Manuel Nores
Project Euler
Commits
a2ff0e27
Commit
a2ff0e27
authored
5 years ago
by
Lucas Fabrizio Di Salvo
Browse files
Options
Download
Email Patches
Plain Diff
resolucionHaskell problem001
parent
23b25d76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
Haskell/problem_001.hs
Haskell/problem_001.hs
+9
-0
No files found.
Haskell/problem_001.hs
0 → 100644
View file @
a2ff0e27
{-
"Multiples of 3 and 5"
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.
-}
let
result
=
sum
[
x
|
x
<-
[
1
..
999
],
x
`
mod
`
3
==
0
||
x
`
mod
`
5
==
0
]
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment