mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 17:58:06 +00:00
commit
8b64287202
2 changed files with 4 additions and 1 deletions
|
@ -27,6 +27,9 @@ static NAME: &'static str = "factor";
|
|||
fn factor(mut num: u64) -> Vec<u64> {
|
||||
let mut ret = Vec::new();
|
||||
|
||||
if num < 2 {
|
||||
return ret;
|
||||
}
|
||||
while num % 2 == 0 {
|
||||
num /= 2;
|
||||
ret.push(2);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit adde85617a776ea98249504d653cb547a2353c98
|
||||
Subproject commit 1711f3a648a5ee1519963820f742b28693c1ce6d
|
Loading…
Reference in a new issue