This commit is contained in:
rzmk 2023-09-21 20:49:05 +00:00
parent 7135c56691
commit 37beb78f2d
6 changed files with 23 additions and 13 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -209,14 +209,20 @@
<a href="#209" id="209">209</a>
<a href="#210" id="210">210</a>
<a href="#211" id="211">211</a>
<a href="#212" id="212">212</a>
<a href="#213" id="213">213</a>
<a href="#214" id="214">214</a>
<a href="#215" id="215">215</a>
</pre></div><pre class="rust"><code><span class="kw">use </span>std::collections::HashSet;
<span class="doccomment">/// Finds all factor pairs for a positive integer `n`.
///
/// This function calculates and returns a `HashSet&lt;(u32, u32)&gt;` containing all unique factor pairs
/// of the input positive integer `n`. A factor pair is a pair of positive integers
/// A factor pair is a pair of positive integers
/// `(a, b)` where `a` and `b` are both factors of `n` (i.e., `a * b == n`).
///
/// This function calculates and returns a `HashSet&lt;(u32, u32)&gt;` containing all unique factor pairs
/// of the input positive integer `n`.
///
/// # Examples
///
/// ```rust
@ -254,10 +260,12 @@
<span class="doccomment">/// Finds all factors of a positive integer `n`.
///
/// This function calculates and returns a `HashSet&lt;u32&gt;` containing all unique factors
/// of the input positive integer `n`. A factor of `n` is a positive integer `a` where
/// A factor of `n` is a positive integer `a` where
/// `n` is evenly divisible by `a` (i.e., `n % a == 0`).
///
/// This function calculates and returns a `HashSet&lt;u32&gt;` containing all unique factors
/// of the input positive integer `n`.
///
/// # Examples
///
/// ```rust