-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b93ce0
commit e5b8934
Showing
3 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Rust Implementation of Problem 3 | ||
================================ | ||
|
||
View source code `here on GitHub! <https://github.com/LivInTheLookingGlass/Euler/blob/master/rust/src/p0003.rs>`_ | ||
|
||
Includes | ||
-------- | ||
|
||
- `primes <./primes.html>`_ | ||
|
||
Problem Solution | ||
---------------- | ||
|
||
.. rust:fn:: p0003::p0003() -> u64 | ||
.. literalinclude:: ../../rust/src/p0003.rs | ||
:language: rust | ||
:linenos: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
Project Euler Problem 3 | ||
This problem was fun, because it let me learn how to make Iterators in rust | ||
Problem: | ||
The prime factors of 13195 are 5, 7, 13 and 29. | ||
What is the largest prime factor of the number 600851475143 ? | ||
*/ | ||
mod primes; | ||
|
||
pub fn p0003() -> u64 { | ||
return primes::prime_factors(600851475143).max(); | ||
} |