Documentation for 8b1eab204b

This commit is contained in:
realstealthninja
2024-11-04 12:43:05 +00:00
parent 4fb6e622e9
commit a7bccf7d01
6732 changed files with 153919 additions and 365711 deletions

View File

@@ -1,3 +1,4 @@
<!-- HTML header for doxygen 1.12.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
@@ -5,10 +6,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp File Reference</title>
<title>TheAlgorithms/C++: bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp File Reference</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
@@ -18,14 +24,24 @@
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
<script type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
@@ -121,7 +138,9 @@ Include dependency graph for count_of_trailing_ciphers_in_factorial_n.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d1/dbe/count__of__trailing__ciphers__in__factorial__n_8cpp__incl.svg" width="255" height="140"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div><table class="memberdecls">
</div>
<p><a href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d81/namespacebit__manipulation.html">bit_manipulation</a></td></tr>
@@ -147,6 +166,8 @@ Functions</h2></td></tr>
<div class="textblock"><p><a href="https://www.tutorialspoint.com/count-trailing-zeros-in-factorial-of-a-number-in-cplusplus" target="_blank">Count the number of ciphers</a> in <code>n!</code> implementation </p>
<p>Given an integer number as input. The goal is to find the number of trailing zeroes in the factorial calculated for that number. A factorial of a number N is a product of all numbers in the range [1, N].</p>
<p>We know that we get a trailing zero only if the number is multiple of 10 or has a factor pair (2,5). In all factorials of any number greater than 5, we have many 2s more than 5s in the prime factorization of that number. Dividing a number by powers of 5 will give us the count of 5s in its factors. So, the number of 5s will tell us the number of trailing zeroes. </p><dl class="section author"><dt>Author</dt><dd><a href="https://github.com/Swastyy" target="_blank">Swastika Gupta</a> </dd></dl>
<p class="definition">Definition in file <a class="el" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html">count_of_trailing_ciphers_in_factorial_n.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2>
@@ -165,17 +186,14 @@ Functions</h2></td></tr>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html#l00096">96</a> of file <a class="el" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html">count_of_trailing_ciphers_in_factorial_n.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 96</span> {</div>
<div class="line"><span class="lineno"> 97</span> <a class="code hl_function" href="#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><span class="lineno"> 98</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><span class="lineno"> 99</span>}</div>
<div class="ttc" id="acount__of__trailing__ciphers__in__factorial__n_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> count_of_trailing_ciphers_in_factorial_n.cpp:60</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="271" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="acount__of__trailing__ciphers__in__factorial__n_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> <a href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html#l00060">count_of_trailing_ciphers_in_factorial_n.cpp:60</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a0d5e1d651d0d30bd682f176d8f2b83d0" name="a0d5e1d651d0d30bd682f176d8f2b83d0"></a>
@@ -201,6 +219,8 @@ Here is the call graph for this function:</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>count, Number of ciphers in <code>n!</code>. </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html#l00041">41</a> of file <a class="el" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html">count_of_trailing_ciphers_in_factorial_n.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 41</span> {</div>
<div class="line"><span class="lineno"> 42</span> <span class="comment">// count is to store the number of 5&#39;s in factorial(n)</span></div>
<div class="line"><span class="lineno"> 43</span> uint64_t count = 0;</div>
@@ -213,12 +233,7 @@ Here is the call graph for this function:</div>
<div class="line"><span class="lineno"> 50</span> </div>
<div class="line"><span class="lineno"> 51</span> <span class="keywordflow">return</span> count;</div>
<div class="line"><span class="lineno"> 52</span>}</div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_a0d5e1d651d0d30bd682f176d8f2b83d0_cgraph.svg" width="220" height="106"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div><!-- fragment -->
</div>
</div>
<a id="aa8dca7b867074164d5f45b0f3851269d" name="aa8dca7b867074164d5f45b0f3851269d"></a>
@@ -246,46 +261,41 @@ Here is the call graph for this function:</div>
<p>Self-test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<p class="definition">Definition at line <a class="el" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html#l00060">60</a> of file <a class="el" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html">count_of_trailing_ciphers_in_factorial_n.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 60</span> {</div>
<div class="line"><span class="lineno"> 61</span> <span class="comment">// 1st test</span></div>
<div class="line"><span class="lineno"> 62</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;1st test &quot;</span>;</div>
<div class="line"><span class="lineno"> 62</span> std::cout &lt;&lt; <span class="stringliteral">&quot;1st test &quot;</span>;</div>
<div class="line"><span class="lineno"> 63</span> assert(bit_manipulation::count_of_trailing_ciphers_in_factorial_n::</div>
<div class="line"><span class="lineno"> 64</span> <a class="code hl_function" href="#a0d5e1d651d0d30bd682f176d8f2b83d0">numberOfCiphersInFactorialN</a>(395) == 97);</div>
<div class="line"><span class="lineno"> 65</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 65</span> std::cout &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 66</span> </div>
<div class="line"><span class="lineno"> 67</span> <span class="comment">// 2nd test</span></div>
<div class="line"><span class="lineno"> 68</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;2nd test &quot;</span>;</div>
<div class="line"><span class="lineno"> 68</span> std::cout &lt;&lt; <span class="stringliteral">&quot;2nd test &quot;</span>;</div>
<div class="line"><span class="lineno"> 69</span> assert(bit_manipulation::count_of_trailing_ciphers_in_factorial_n::</div>
<div class="line"><span class="lineno"> 70</span> <a class="code hl_function" href="#a0d5e1d651d0d30bd682f176d8f2b83d0">numberOfCiphersInFactorialN</a>(977) == 242);</div>
<div class="line"><span class="lineno"> 71</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 71</span> std::cout &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 72</span> </div>
<div class="line"><span class="lineno"> 73</span> <span class="comment">// 3rd test</span></div>
<div class="line"><span class="lineno"> 74</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;3rd test &quot;</span>;</div>
<div class="line"><span class="lineno"> 74</span> std::cout &lt;&lt; <span class="stringliteral">&quot;3rd test &quot;</span>;</div>
<div class="line"><span class="lineno"> 75</span> assert(bit_manipulation::count_of_trailing_ciphers_in_factorial_n::</div>
<div class="line"><span class="lineno"> 76</span> <a class="code hl_function" href="#a0d5e1d651d0d30bd682f176d8f2b83d0">numberOfCiphersInFactorialN</a>(871) == 215);</div>
<div class="line"><span class="lineno"> 77</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 77</span> std::cout &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 78</span> </div>
<div class="line"><span class="lineno"> 79</span> <span class="comment">// 4th test</span></div>
<div class="line"><span class="lineno"> 80</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;4th test &quot;</span>;</div>
<div class="line"><span class="lineno"> 80</span> std::cout &lt;&lt; <span class="stringliteral">&quot;4th test &quot;</span>;</div>
<div class="line"><span class="lineno"> 81</span> assert(bit_manipulation::count_of_trailing_ciphers_in_factorial_n::</div>
<div class="line"><span class="lineno"> 82</span> <a class="code hl_function" href="#a0d5e1d651d0d30bd682f176d8f2b83d0">numberOfCiphersInFactorialN</a>(239) == 57);</div>
<div class="line"><span class="lineno"> 83</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 83</span> std::cout &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 84</span> </div>
<div class="line"><span class="lineno"> 85</span> <span class="comment">// 5th test</span></div>
<div class="line"><span class="lineno"> 86</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;5th test &quot;</span>;</div>
<div class="line"><span class="lineno"> 86</span> std::cout &lt;&lt; <span class="stringliteral">&quot;5th test &quot;</span>;</div>
<div class="line"><span class="lineno"> 87</span> assert(bit_manipulation::count_of_trailing_ciphers_in_factorial_n::</div>
<div class="line"><span class="lineno"> 88</span> <a class="code hl_function" href="#a0d5e1d651d0d30bd682f176d8f2b83d0">numberOfCiphersInFactorialN</a>(0) == 0);</div>
<div class="line"><span class="lineno"> 89</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 89</span> std::cout &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><span class="lineno"> 90</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="acount__of__trailing__ciphers__in__factorial__n_8cpp_html_a0d5e1d651d0d30bd682f176d8f2b83d0"><div class="ttname"><a href="#a0d5e1d651d0d30bd682f176d8f2b83d0">bit_manipulation::count_of_trailing_ciphers_in_factorial_n::numberOfCiphersInFactorialN</a></div><div class="ttdeci">uint64_t numberOfCiphersInFactorialN(uint64_t n)</div><div class="ttdoc">Function to count the number of the trailing ciphers.</div><div class="ttdef"><b>Definition</b> count_of_trailing_ciphers_in_factorial_n.cpp:41</div></div>
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_aa8dca7b867074164d5f45b0f3851269d_cgraph.svg" width="174" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<div class="ttc" id="acount__of__trailing__ciphers__in__factorial__n_8cpp_html_a0d5e1d651d0d30bd682f176d8f2b83d0"><div class="ttname"><a href="#a0d5e1d651d0d30bd682f176d8f2b83d0">bit_manipulation::count_of_trailing_ciphers_in_factorial_n::numberOfCiphersInFactorialN</a></div><div class="ttdeci">uint64_t numberOfCiphersInFactorialN(uint64_t n)</div><div class="ttdoc">Function to count the number of the trailing ciphers.</div><div class="ttdef"><b>Definition</b> <a href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html#l00041">count_of_trailing_ciphers_in_factorial_n.cpp:41</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->

View File

@@ -1,4 +0,0 @@
<map id="bit_manipulation::count_of_trailing_ciphers_in_factorial_n::numberOfCiphersInFactorialN" name="bit_manipulation::count_of_trailing_ciphers_in_factorial_n::numberOfCiphersInFactorialN">
<area shape="rect" id="Node000001" title="Function to count the number of the trailing ciphers." alt="" coords="5,29,215,100"/>
<area shape="poly" id="edge1_Node000001_Node000001" title=" " alt="" coords="68,28,70,18,78,10,92,5,110,3,131,5,145,12,142,17,130,10,110,8,93,10,81,14,75,21,73,29"/>
</map>

View File

@@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: bit_manipulation::count_of_trailing_ciphers_in_factorial_n::numberOfCiphersInFactorialN Pages: 1 -->
<svg width="165pt" height="79pt"
viewBox="0.00 0.00 165.00 79.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 75)">
<title>bit_manipulation::count_of_trailing_ciphers_in_factorial_n::numberOfCiphersInFactorialN</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Function to count the number of the trailing ciphers.">
<polygon fill="#999999" stroke="#666666" points="157,-53 0,-53 0,0 157,0 157,-53"/>
<text text-anchor="start" x="8" y="-39.5" font-family="Helvetica,sans-Serif" font-size="10.00">bit_manipulation::count</text>
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">_of_trailing_ciphers_in</text>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_factorial_n::numberOfCiphersIn</text>
<text text-anchor="middle" x="78.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">FactorialN</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M49.09,-53.44C48.46,-63.11 58.26,-71 78.5,-71 90.52,-71 98.85,-68.22 103.51,-63.94"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="106.69,-65.41 107.32,-54.83 100.23,-62.71 106.69,-65.41"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: bit_manipulation::count_of_trailing_ciphers_in_factorial_n::numberOfCiphersInFactorialN Pages: 1 -->
<svg width="165pt" height="79pt"
viewBox="0.00 0.00 165.00 79.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 75)">
<title>bit_manipulation::count_of_trailing_ciphers_in_factorial_n::numberOfCiphersInFactorialN</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Function to count the number of the trailing ciphers.">
<polygon fill="#999999" stroke="#666666" points="157,-53 0,-53 0,0 157,0 157,-53"/>
<text text-anchor="start" x="8" y="-39.5" font-family="Helvetica,sans-Serif" font-size="10.00">bit_manipulation::count</text>
<text text-anchor="start" x="8" y="-28.25" font-family="Helvetica,sans-Serif" font-size="10.00">_of_trailing_ciphers_in</text>
<text text-anchor="start" x="8" y="-17" font-family="Helvetica,sans-Serif" font-size="10.00">_factorial_n::numberOfCiphersIn</text>
<text text-anchor="middle" x="78.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">FactorialN</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node1 -->
<g id="edge1_Node000001_Node000001" class="edge">
<title>Node1&#45;&gt;Node1</title>
<g id="a_edge1_Node000001_Node000001"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M49.09,-53.44C48.46,-63.11 58.26,-71 78.5,-71 90.52,-71 98.85,-68.22 103.51,-63.94"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="106.69,-65.41 107.32,-54.83 100.23,-62.71 106.69,-65.41"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -1,5 +0,0 @@
<map id="test" name="test">
<area shape="rect" id="Node000001" title="Self&#45;test implementations." alt="" coords="5,5,49,31"/>
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="97,5,168,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="49,16,81,16,81,21,49,21"/>
</map>

View File

@@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: test Pages: 1 -->
<svg width="130pt" height="27pt"
viewBox="0.00 0.00 130.00 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>test</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Self&#45;test implementations.">
<polygon fill="#999999" stroke="#666666" points="32.5,-19.25 0,-19.25 0,0 32.5,0 32.5,-19.25"/>
<text text-anchor="middle" x="16.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="122,-19.25 68.5,-19.25 68.5,0 122,0 122,-19.25"/>
<text text-anchor="middle" x="95.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M32.83,-9.62C39.78,-9.62 48.3,-9.62 56.75,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="56.56,-13.13 66.56,-9.63 56.56,-6.13 56.56,-13.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: test Pages: 1 -->
<svg width="130pt" height="27pt"
viewBox="0.00 0.00 130.00 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>test</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Self&#45;test implementations.">
<polygon fill="#999999" stroke="#666666" points="32.5,-19.25 0,-19.25 0,0 32.5,0 32.5,-19.25"/>
<text text-anchor="middle" x="16.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="122,-19.25 68.5,-19.25 68.5,0 122,0 122,-19.25"/>
<text text-anchor="middle" x="95.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M32.83,-9.62C39.78,-9.62 48.3,-9.62 56.75,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="56.56,-13.13 66.56,-9.63 56.56,-6.13 56.56,-13.13"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1,7 +0,0 @@
<map id="main" name="main">
<area shape="rect" id="Node000001" title="Main function." alt="" coords="5,5,55,31"/>
<area shape="rect" id="Node000002" href="$da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" title="Self&#45;test implementations." alt="" coords="103,5,146,31"/>
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="55,16,87,16,87,21,55,21"/>
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="194,5,265,31"/>
<area shape="poly" id="edge2_Node000002_Node000003" title=" " alt="" coords="146,16,178,16,178,21,146,21"/>
</map>

View File

@@ -1,83 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: main Pages: 1 -->
<svg width="203pt" height="27pt"
viewBox="0.00 0.00 203.00 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<style type="text/css"><![CDATA[
.node, .edge {opacity: 0.7;}
.node.selected, .edge.selected {opacity: 1;}
.edge:hover path { stroke: red; }
.edge:hover polygon { stroke: red; fill: red; }
]]></style>
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
<svg id="graph" class="graph">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>main</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Main function.">
<polygon fill="#999999" stroke="#666666" points="37,-19.25 0,-19.25 0,0 37,0 37,-19.25"/>
<text text-anchor="middle" x="18.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Self&#45;test implementations.">
<polygon fill="white" stroke="#666666" points="105.5,-19.25 73,-19.25 73,0 105.5,0 105.5,-19.25"/>
<text text-anchor="middle" x="89.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.2,-9.62C44.58,-9.62 53.31,-9.62 61.45,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.2,-13.13 71.2,-9.63 61.2,-6.13 61.2,-13.13"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="195,-19.25 141.5,-19.25 141.5,0 195,0 195,-19.25"/>
<text text-anchor="middle" x="168.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M105.83,-9.62C112.78,-9.62 121.3,-9.62 129.75,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="129.56,-13.13 139.56,-9.63 129.56,-6.13 129.56,-13.13"/>
</a>
</g>
</g>
</g>
</svg>
</svg>
<style type='text/css'>
<![CDATA[
[data-mouse-over-selected='false'] { opacity: 0.7; }
[data-mouse-over-selected='true'] { opacity: 1.0; }
]]>
</style>
<script type="application/ecmascript"><![CDATA[
document.addEventListener('DOMContentLoaded', (event) => {
highlightEdges();
highlightAdjacentNodes();
});
]]></script>
</svg>

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
-->
<!-- Title: main Pages: 1 -->
<svg width="203pt" height="27pt"
viewBox="0.00 0.00 203.00 27.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 23.25)">
<title>main</title>
<!-- Node1 -->
<g id="Node000001" class="node">
<title>Node1</title>
<g id="a_Node000001"><a xlink:title="Main function.">
<polygon fill="#999999" stroke="#666666" points="37,-19.25 0,-19.25 0,0 37,0 37,-19.25"/>
<text text-anchor="middle" x="18.5" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
</a>
</g>
</g>
<!-- Node2 -->
<g id="Node000002" class="node">
<title>Node2</title>
<g id="a_Node000002"><a xlink:href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#aa8dca7b867074164d5f45b0f3851269d" target="_top" xlink:title="Self&#45;test implementations.">
<polygon fill="white" stroke="#666666" points="105.5,-19.25 73,-19.25 73,0 105.5,0 105.5,-19.25"/>
<text text-anchor="middle" x="89.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">test</text>
</a>
</g>
</g>
<!-- Node1&#45;&gt;Node2 -->
<g id="edge1_Node000001_Node000002" class="edge">
<title>Node1&#45;&gt;Node2</title>
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M37.2,-9.62C44.58,-9.62 53.31,-9.62 61.45,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.2,-13.13 71.2,-9.63 61.2,-6.13 61.2,-13.13"/>
</a>
</g>
</g>
<!-- Node3 -->
<g id="Node000003" class="node">
<title>Node3</title>
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
<polygon fill="white" stroke="#666666" points="195,-19.25 141.5,-19.25 141.5,0 195,0 195,-19.25"/>
<text text-anchor="middle" x="168.25" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
</a>
</g>
</g>
<!-- Node2&#45;&gt;Node3 -->
<g id="edge2_Node000002_Node000003" class="edge">
<title>Node2&#45;&gt;Node3</title>
<g id="a_edge2_Node000002_Node000003"><a xlink:title=" ">
<path fill="none" stroke="#63b8ff" d="M105.83,-9.62C112.78,-9.62 121.3,-9.62 129.75,-9.62"/>
<polygon fill="#63b8ff" stroke="#63b8ff" points="129.56,-13.13 139.56,-9.63 129.56,-6.13 129.56,-13.13"/>
</a>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,206 @@
<!-- HTML header for doxygen 1.12.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TheAlgorithms/C++: bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp Source File</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp_source.html','../../'); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">count_of_trailing_ciphers_in_factorial_n.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &lt;cassert&gt;</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &lt;iostream&gt;</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d7/d81/namespacebit__manipulation.html">bit_manipulation</a> {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../dc/d2f/namespacecount__of__trailing__ciphers__in__factorial__n.html">count_of_trailing_ciphers_in_factorial_n</a> {</div>
<div class="foldopen" id="foldopen00041" data-start="{" data-end="}">
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#a0d5e1d651d0d30bd682f176d8f2b83d0"> 41</a></span>uint64_t <a class="code hl_function" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#a0d5e1d651d0d30bd682f176d8f2b83d0">numberOfCiphersInFactorialN</a>(uint64_t n) {</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="comment">// count is to store the number of 5&#39;s in factorial(n)</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> uint64_t count = 0;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="comment">// Keep dividing n by powers of</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="comment">// 5 and update count</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">for</span> (uint64_t i = 5; n / i &gt;= 1; i *= 5) {</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> count += <span class="keyword">static_cast&lt;</span>uint64_t<span class="keyword">&gt;</span>(n) / i;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> }</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">return</span> count;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span>}</div>
</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span>} <span class="comment">// namespace count_of_trailing_ciphers_in_factorial_n</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span>} <span class="comment">// namespace bit_manipulation</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
<div class="foldopen" id="foldopen00060" data-start="{" data-end="}">
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#aa8dca7b867074164d5f45b0f3851269d"> 60</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>() {</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// 1st test</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> std::cout &lt;&lt; <span class="stringliteral">&quot;1st test &quot;</span>;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> assert(bit_manipulation::count_of_trailing_ciphers_in_factorial_n::</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> numberOfCiphersInFactorialN(395) == 97);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> std::cout &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// 2nd test</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> std::cout &lt;&lt; <span class="stringliteral">&quot;2nd test &quot;</span>;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> assert(bit_manipulation::count_of_trailing_ciphers_in_factorial_n::</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> numberOfCiphersInFactorialN(977) == 242);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> std::cout &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="comment">// 3rd test</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> std::cout &lt;&lt; <span class="stringliteral">&quot;3rd test &quot;</span>;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> assert(bit_manipulation::count_of_trailing_ciphers_in_factorial_n::</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> numberOfCiphersInFactorialN(871) == 215);</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> std::cout &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="comment">// 4th test</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> std::cout &lt;&lt; <span class="stringliteral">&quot;4th test &quot;</span>;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> assert(bit_manipulation::count_of_trailing_ciphers_in_factorial_n::</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> numberOfCiphersInFactorialN(239) == 57);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> std::cout &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="comment">// 5th test</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> std::cout &lt;&lt; <span class="stringliteral">&quot;5th test &quot;</span>;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> assert(bit_manipulation::count_of_trailing_ciphers_in_factorial_n::</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> numberOfCiphersInFactorialN(0) == 0);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> std::cout &lt;&lt; <span class="stringliteral">&quot;passed&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span>}</div>
</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="foldopen" id="foldopen00096" data-start="{" data-end="}">
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 96</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_function" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span>}</div>
</div>
<div class="ttc" id="acount__of__trailing__ciphers__in__factorial__n_8cpp_html_a0d5e1d651d0d30bd682f176d8f2b83d0"><div class="ttname"><a href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#a0d5e1d651d0d30bd682f176d8f2b83d0">bit_manipulation::count_of_trailing_ciphers_in_factorial_n::numberOfCiphersInFactorialN</a></div><div class="ttdeci">uint64_t numberOfCiphersInFactorialN(uint64_t n)</div><div class="ttdoc">Function to count the number of the trailing ciphers.</div><div class="ttdef"><b>Definition</b> <a href="#l00041">count_of_trailing_ciphers_in_factorial_n.cpp:41</a></div></div>
<div class="ttc" id="acount__of__trailing__ciphers__in__factorial__n_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition</b> <a href="#l00060">count_of_trailing_ciphers_in_factorial_n.cpp:60</a></div></div>
<div class="ttc" id="acount__of__trailing__ciphers__in__factorial__n_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">Main function.</div><div class="ttdef"><b>Definition</b> <a href="#l00096">count_of_trailing_ciphers_in_factorial_n.cpp:96</a></div></div>
<div class="ttc" id="anamespacebit__manipulation_html"><div class="ttname"><a href="../../d7/d81/namespacebit__manipulation.html">bit_manipulation</a></div><div class="ttdoc">for assert</div></div>
<div class="ttc" id="anamespacecount__of__trailing__ciphers__in__factorial__n_html"><div class="ttname"><a href="../../dc/d2f/namespacecount__of__trailing__ciphers__in__factorial__n.html">count_of_trailing_ciphers_in_factorial_n</a></div><div class="ttdoc">Functions for the Count the number of ciphers in n! implementation.</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_f3c4fbc4e901afa0a54d0623c5574aa7.html">bit_manipulation</a></li><li class="navelem"><a class="el" href="../../da/d50/count__of__trailing__ciphers__in__factorial__n_8cpp.html">count_of_trailing_ciphers_in_factorial_n.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
</ul>
</div>
</body>
</html>