Skip to content

Commit

Permalink
golf
Browse files Browse the repository at this point in the history
  • Loading branch information
lrvideckis committed Nov 22, 2024
1 parent 25c67e7 commit ba62ec7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions library/math/prime_sieve/get_prime_factors.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once
#include "calc_sieve.hpp"
//! `fac` will equal all prime factors of num, increasing
//! `p` will be all prime factors of num, increasing
//! @time O(log(num))
//! @space O(1)
for (int left = num, fac = sieve[left]; left > 1;
fac = sieve[left /= fac])
for (int cpy = num, p; (p = sieve[cpy]) > 1; cpy /= p)

0 comments on commit ba62ec7

Please sign in to comment.