<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=0111_-_Nr_Fact</id>
	<title>0111 - Nr Fact - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=0111_-_Nr_Fact"/>
	<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0111_-_Nr_Fact&amp;action=history"/>
	<updated>2026-05-01T14:00:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=0111_-_Nr_Fact&amp;diff=3446&amp;oldid=prev</id>
		<title>Paul Matei at 11:55, 11 April 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0111_-_Nr_Fact&amp;diff=3446&amp;oldid=prev"/>
		<updated>2023-04-11T11:55:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:55, 11 April 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l67&quot;&gt;Line 67:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 67:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Explicație rezolvare==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Explicație rezolvare==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Programul citeste &lt;/del&gt;de &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;la tastatura &lt;/del&gt;un &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sir &lt;/del&gt;de &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;n &lt;/del&gt;numere &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;si calculeaza pentru fiecare numar din sir numarul &lt;/del&gt;de factori primi. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pentru a determina acest lucru, se foloseste metoda &lt;/del&gt;de &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;factorizare in &lt;/del&gt;factori primi, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;adica se impart numarul iterativ cu divizorii sai primi pana cand numarul ramas este 1&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Acest cod verifică validitatea datelor &lt;/ins&gt;de &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;intrare și apoi găsește numărul dintr-&lt;/ins&gt;un &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;șir &lt;/ins&gt;de numere &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;care are cel mai mare număr &lt;/ins&gt;de factori primi. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Funcția &#039;&#039;&#039;numar_factori_primi(n)&#039;&#039;&#039; calculează numărul &lt;/ins&gt;de factori primi &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ai unui număr, iar funcția &#039;&#039;&#039;validare_date(n&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sir_numere)&#039;&#039;&#039; verifică dacă datele introduse sunt valide&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Dacă datele sunt valide, programul găsește numărul &lt;/ins&gt;din &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;șir care are &lt;/ins&gt;cel mai mare &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;număr &lt;/ins&gt;de factori primi &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;și îl afișează&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Dupa ce se calculeaza numarul de factori primi pentru fiecare numar &lt;/del&gt;din &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sir, se determina numarul cu &lt;/del&gt;cel mai mare &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;numar de factori primi. Daca exista mai multe numere cu acelasi numar maxim &lt;/del&gt;de factori primi&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, se afiseaza cel mai mic dintre acestea.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Programul este validat pentru intrari corespunzatoare restrictiilor impuse prin functia &quot;validare_date&quot; si este apelat in blocul &quot;if name == &#039;main&#039;:&quot; pentru a asigura rularea doar in cazul in care programul este rulat direct si nu este importat ca modul intr-un alt program&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Paul Matei</name></author>
	</entry>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=0111_-_Nr_Fact&amp;diff=2940&amp;oldid=prev</id>
		<title>Diana Butuza: /* Exemplu */</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0111_-_Nr_Fact&amp;diff=2940&amp;oldid=prev"/>
		<updated>2023-04-06T08:18:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Exemplu&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:18, 6 April 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Intrare&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Intrare&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:5&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:5&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;72 30 12 75 17&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:&lt;/ins&gt;72 30 12 75 17&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Ieșire&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Ieșire&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:30  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:30&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Explicație ==  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Explicație ==  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;30&amp;#039;&amp;#039;&amp;#039; are trei factori primi. Celelalte numere au mai puţini factori primi.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;30&amp;#039;&amp;#039;&amp;#039; are trei factori primi. Celelalte numere au mai puţini factori primi.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Diana Butuza</name></author>
	</entry>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=0111_-_Nr_Fact&amp;diff=2333&amp;oldid=prev</id>
		<title>Paul Matei: Pagină nouă: == Cerinţa == Să se scrie un program care citește un șir de &#039;&#039;&#039;n&#039;&#039;&#039; numere naturale şi determină numărul din şir care are număr maxim de factori primi. == Date de intrare == Programul citește de la tastatură numărul &#039;&#039;&#039;n&#039;&#039;&#039;, iar apoi &#039;&#039;&#039;n&#039;&#039;&#039; numere naturale nenule, separate prin spaţii. == Date de ieşire == Programul afișează pe ecran numărul &#039;&#039;&#039;x&#039;&#039;&#039;, numărul din şir cu număr maxim de factori primi. == Restricții și precizări == *&#039;&#039;&#039;0 &lt; n &lt; 1001&#039;&#039;&#039; *cel...</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0111_-_Nr_Fact&amp;diff=2333&amp;oldid=prev"/>
		<updated>2023-04-01T21:38:07Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: == Cerinţa == Să se scrie un program care citește un șir de &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; numere naturale şi determină numărul din şir care are număr maxim de factori primi. == Date de intrare == Programul citește de la tastatură numărul &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039;, iar apoi &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; numere naturale nenule, separate prin spaţii. == Date de ieşire == Programul afișează pe ecran numărul &amp;#039;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;#039;, numărul din şir cu număr maxim de factori primi. == Restricții și precizări == *&amp;#039;&amp;#039;&amp;#039;0 &amp;lt; n &amp;lt; 1001&amp;#039;&amp;#039;&amp;#039; *cel...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Cerinţa ==&lt;br /&gt;
Să se scrie un program care citește un șir de &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; numere naturale şi determină numărul din şir care are număr maxim de factori primi.&lt;br /&gt;
== Date de intrare ==&lt;br /&gt;
Programul citește de la tastatură numărul &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039;, iar apoi &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; numere naturale nenule, separate prin spaţii.&lt;br /&gt;
== Date de ieşire ==&lt;br /&gt;
Programul afișează pe ecran numărul &amp;#039;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;#039;, numărul din şir cu număr maxim de factori primi.&lt;br /&gt;
== Restricții și precizări ==&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;0 &amp;lt; n &amp;lt; 1001&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*cele &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; numere citite vor fi mai mici decât &amp;#039;&amp;#039;&amp;#039;2.000.000.000&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*dacă în şir există mai multe numere cu număr maxim de factori primi, se va afişa cel mai mic dintre acestea&lt;br /&gt;
== Exemplu ==&lt;br /&gt;
; Intrare&lt;br /&gt;
:5&lt;br /&gt;
72 30 12 75 17&lt;br /&gt;
; Ieșire&lt;br /&gt;
:30 &lt;br /&gt;
== Explicație == &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;30&amp;#039;&amp;#039;&amp;#039; are trei factori primi. Celelalte numere au mai puţini factori primi.&lt;br /&gt;
== Rezolvare ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
def numar_factori_primi(n):&lt;br /&gt;
    factori_primi = 0&lt;br /&gt;
    divizor = 2&lt;br /&gt;
    while divizor &amp;lt;= n:&lt;br /&gt;
        if n % divizor == 0:&lt;br /&gt;
            factori_primi += 1&lt;br /&gt;
            while n % divizor == 0:&lt;br /&gt;
                n //= divizor&lt;br /&gt;
        divizor += 1&lt;br /&gt;
    return factori_primi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def validare_date(n, sir_numere):&lt;br /&gt;
    if n &amp;lt; 1 or n &amp;gt; 1000:&lt;br /&gt;
        return False&lt;br /&gt;
    for numar in sir_numere:&lt;br /&gt;
        if numar &amp;lt;= 0 or numar &amp;gt;= 2000000000:&lt;br /&gt;
            return False&lt;br /&gt;
    return True&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;#039;__main__&amp;#039;:&lt;br /&gt;
    n = int(input(&amp;quot;Introduceti numarul de numere din sir: &amp;quot;))&lt;br /&gt;
    sir_numere = list(map(int, input(&amp;quot;Introduceti numerele separate prin spatii: &amp;quot;).split()))&lt;br /&gt;
    if validare_date(n, sir_numere):&lt;br /&gt;
        print(&amp;quot;\nDatele de intrare corespund restricțiilor impuse.\n&amp;quot;)&lt;br /&gt;
        max_factori_primi = 0&lt;br /&gt;
        numar_max_factori_primi = sir_numere[0]&lt;br /&gt;
&lt;br /&gt;
        for numar in sir_numere:&lt;br /&gt;
            factori_primi = numar_factori_primi(numar)&lt;br /&gt;
            if factori_primi &amp;gt; max_factori_primi:&lt;br /&gt;
                max_factori_primi = factori_primi&lt;br /&gt;
                numar_max_factori_primi = numar&lt;br /&gt;
            elif factori_primi == max_factori_primi and numar &amp;lt; numar_max_factori_primi:&lt;br /&gt;
                numar_max_factori_primi = numar&lt;br /&gt;
&lt;br /&gt;
        print(f&amp;quot;Numarul cu cel mai mare numar de factori primi este: {numar_max_factori_primi}&amp;quot;)&lt;br /&gt;
    else:&lt;br /&gt;
        print(&amp;quot;Datele de intrare nu corespund restricțiilor impuse.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Explicație rezolvare==&lt;br /&gt;
Programul citeste de la tastatura un sir de n numere si calculeaza pentru fiecare numar din sir numarul de factori primi. Pentru a determina acest lucru, se foloseste metoda de factorizare in factori primi, adica se impart numarul iterativ cu divizorii sai primi pana cand numarul ramas este 1.&lt;br /&gt;
&lt;br /&gt;
Dupa ce se calculeaza numarul de factori primi pentru fiecare numar din sir, se determina numarul cu cel mai mare numar de factori primi. Daca exista mai multe numere cu acelasi numar maxim de factori primi, se afiseaza cel mai mic dintre acestea.&lt;br /&gt;
&lt;br /&gt;
Programul este validat pentru intrari corespunzatoare restrictiilor impuse prin functia &amp;quot;validare_date&amp;quot; si este apelat in blocul &amp;quot;if name == &amp;#039;main&amp;#039;:&amp;quot; pentru a asigura rularea doar in cazul in care programul este rulat direct si nu este importat ca modul intr-un alt program.&lt;/div&gt;</summary>
		<author><name>Paul Matei</name></author>
	</entry>
</feed>