<?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=3666_-_Ver_Nr_Imp_Div</id>
	<title>3666 - Ver Nr Imp Div - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=3666_-_Ver_Nr_Imp_Div"/>
	<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=3666_-_Ver_Nr_Imp_Div&amp;action=history"/>
	<updated>2026-05-01T08:48:39Z</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=3666_-_Ver_Nr_Imp_Div&amp;diff=3409&amp;oldid=prev</id>
		<title>Robert Manc at 10:27, 11 April 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=3666_-_Ver_Nr_Imp_Div&amp;diff=3409&amp;oldid=prev"/>
		<updated>2023-04-11T10:27:49Z</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 10:27, 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-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;: 4&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;: 4&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;: Datele &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;introduse &lt;/del&gt;corespund restricțiilor impuse.&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;: Datele &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;de intrare &lt;/ins&gt;corespund restricțiilor impuse.&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;: da&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;: da&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;== 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;== Rezolvare ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Robert Manc</name></author>
	</entry>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=3666_-_Ver_Nr_Imp_Div&amp;diff=1435&amp;oldid=prev</id>
		<title>Robert Manc: Pagină nouă: == Cerinţa == Se dă un număr natural nenul, numit ”&#039;&#039;&#039;numar&#039;&#039;&#039;”. Să se testeze dacă ”&#039;&#039;&#039;numar&#039;&#039;&#039;” are număr impar de divizori. == Date de intrare == Programul citește de la tastatură un număr natural ”&#039;&#039;&#039;numar&#039;&#039;&#039;”. == Date de ieşire == Programul va afișa pe ecran mesajul &#039;&#039;&#039;da&#039;&#039;&#039; dacă &#039;&#039;&#039;numar&#039;&#039;&#039; are număr impar de divizori şi mesajul &#039;&#039;&#039;nu&#039;&#039;&#039; în caz contrar. == Restricții și precizări == * numar &amp;isin; &amp;Nu; * 0 &amp;les; numar &amp;les; 1.000.000.000 ==...</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=3666_-_Ver_Nr_Imp_Div&amp;diff=1435&amp;oldid=prev"/>
		<updated>2023-03-22T13:38:25Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: == Cerinţa == Se dă un număr natural nenul, numit ”&amp;#039;&amp;#039;&amp;#039;numar&amp;#039;&amp;#039;&amp;#039;”. Să se testeze dacă ”&amp;#039;&amp;#039;&amp;#039;numar&amp;#039;&amp;#039;&amp;#039;” are număr impar de divizori. == Date de intrare == Programul citește de la tastatură un număr natural ”&amp;#039;&amp;#039;&amp;#039;numar&amp;#039;&amp;#039;&amp;#039;”. == Date de ieşire == Programul va afișa pe ecran mesajul &amp;#039;&amp;#039;&amp;#039;da&amp;#039;&amp;#039;&amp;#039; dacă &amp;#039;&amp;#039;&amp;#039;numar&amp;#039;&amp;#039;&amp;#039; are număr impar de divizori şi mesajul &amp;#039;&amp;#039;&amp;#039;nu&amp;#039;&amp;#039;&amp;#039; în caz contrar. == Restricții și precizări == * numar ∈ Ν * 0 ⩽ numar ⩽ 1.000.000.000 ==...&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;
Se dă un număr natural nenul, numit ”&amp;#039;&amp;#039;&amp;#039;numar&amp;#039;&amp;#039;&amp;#039;”. Să se testeze dacă ”&amp;#039;&amp;#039;&amp;#039;numar&amp;#039;&amp;#039;&amp;#039;” are număr impar de divizori.&lt;br /&gt;
== Date de intrare ==&lt;br /&gt;
Programul citește de la tastatură un număr natural ”&amp;#039;&amp;#039;&amp;#039;numar&amp;#039;&amp;#039;&amp;#039;”.&lt;br /&gt;
== Date de ieşire ==&lt;br /&gt;
Programul va afișa pe ecran mesajul &amp;#039;&amp;#039;&amp;#039;da&amp;#039;&amp;#039;&amp;#039; dacă &amp;#039;&amp;#039;&amp;#039;numar&amp;#039;&amp;#039;&amp;#039; are număr impar de divizori şi mesajul &amp;#039;&amp;#039;&amp;#039;nu&amp;#039;&amp;#039;&amp;#039; în caz contrar.&lt;br /&gt;
== Restricții și precizări ==&lt;br /&gt;
* numar &amp;amp;isin; &amp;amp;Nu;&lt;br /&gt;
* 0 &amp;amp;les; numar &amp;amp;les; 1.000.000.000&lt;br /&gt;
== Exemplu ==&lt;br /&gt;
; Intrare&lt;br /&gt;
: 4&lt;br /&gt;
; Ieșire&lt;br /&gt;
: Datele introduse corespund restricțiilor impuse.&lt;br /&gt;
: da&lt;br /&gt;
== Rezolvare ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
def validare_date(numar):&lt;br /&gt;
    flag = False&lt;br /&gt;
    if numar.isdigit():&lt;br /&gt;
        if 0 &amp;lt;= int(numar) &amp;lt;= 1_000_000_000:&lt;br /&gt;
            flag = True&lt;br /&gt;
    return flag&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def verificare_paritate(numar):&lt;br /&gt;
    suma_divizorilor = 0&lt;br /&gt;
    for i in range(1, numar // 2 + 1):&lt;br /&gt;
        if numar % i == 0:&lt;br /&gt;
            suma_divizorilor += i&lt;br /&gt;
    suma_divizorilor += numar&lt;br /&gt;
    if suma_divizorilor % 2 == 1:&lt;br /&gt;
        print(&amp;quot;da&amp;quot;)&lt;br /&gt;
    else:&lt;br /&gt;
        print(&amp;quot;nu&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;#039;__main__&amp;#039;:&lt;br /&gt;
    numar = input()&lt;br /&gt;
    if validare_date(numar):&lt;br /&gt;
        print(&amp;quot;\nDatele de intrare corespund restricțiilor impuse.\n&amp;quot;)&lt;br /&gt;
        verificare_paritate(int(numar))&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert Manc</name></author>
	</entry>
</feed>