You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclass="definition">Definition at line <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html#l00081">81</a> of file <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html">number_of_positive_divisors.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html#l00080">80</a> of file <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html">number_of_positive_divisors.cpp</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd>number of positive divisors of n (or 1 if n = 0) </dd></dl>
207
197
208
-
<pclass="definition">Definition at line <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html#l00033">33</a> of file <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html">number_of_positive_divisors.cpp</a>.</p>
<divclass="line"><spanclass="lineno">40</span><spanclass="keywordflow">for</span> (<spanclass="keywordtype">int</span> i = 2; i * i <= n; i++) {</div>
217
-
<divclass="line"><spanclass="lineno">41</span><spanclass="comment">// This part is doing the prime factorization.</span></div>
218
-
<divclass="line"><spanclass="lineno">42</span><spanclass="comment">// Note that we cannot find a composite divisor of n unless we would</span></div>
219
-
<divclass="line"><spanclass="lineno">43</span><spanclass="comment">// already previously find the corresponding prime divisor and dvided</span></div>
220
-
<divclass="line"><spanclass="lineno">44</span><spanclass="comment">// n by that prime. Therefore, all the divisors found here will</span></div>
221
-
<divclass="line"><spanclass="lineno">45</span><spanclass="comment">// actually be primes.</span></div>
222
-
<divclass="line"><spanclass="lineno">46</span><spanclass="comment">// The loop terminates early when it is left with a number n which</span></div>
223
-
<divclass="line"><spanclass="lineno">47</span><spanclass="comment">// does not have a divisor smaller or equal to sqrt(n) - that means</span></div>
224
-
<divclass="line"><spanclass="lineno">48</span><spanclass="comment">// the remaining number is a prime itself.</span></div>
<pclass="definition">Definition at line <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html#l00032">32</a> of file <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html">number_of_positive_divisors.cpp</a>.</p>
<divclass="line"><spanclass="lineno">39</span><spanclass="keywordflow">for</span> (<spanclass="keywordtype">int</span> i = 2; i * i <= n; i++) {</div>
207
+
<divclass="line"><spanclass="lineno">40</span><spanclass="comment">// This part is doing the prime factorization.</span></div>
208
+
<divclass="line"><spanclass="lineno">41</span><spanclass="comment">// Note that we cannot find a composite divisor of n unless we would</span></div>
209
+
<divclass="line"><spanclass="lineno">42</span><spanclass="comment">// already previously find the corresponding prime divisor and dvided</span></div>
210
+
<divclass="line"><spanclass="lineno">43</span><spanclass="comment">// n by that prime. Therefore, all the divisors found here will</span></div>
211
+
<divclass="line"><spanclass="lineno">44</span><spanclass="comment">// actually be primes.</span></div>
212
+
<divclass="line"><spanclass="lineno">45</span><spanclass="comment">// The loop terminates early when it is left with a number n which</span></div>
213
+
<divclass="line"><spanclass="lineno">46</span><spanclass="comment">// does not have a divisor smaller or equal to sqrt(n) - that means</span></div>
214
+
<divclass="line"><spanclass="lineno">47</span><spanclass="comment">// the remaining number is a prime itself.</span></div>
<pclass="definition">Definition at line <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html#l00070">70</a> of file <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html">number_of_positive_divisors.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html#l00069">69</a> of file <aclass="el" href="../../d0/da2/number__of__positive__divisors_8cpp_source.html">number_of_positive_divisors.cpp</a>.</p>
0 commit comments