<?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=1613_-_Numere_15</id>
	<title>1613 - Numere 15 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=1613_-_Numere_15"/>
	<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=1613_-_Numere_15&amp;action=history"/>
	<updated>2026-05-01T06:48:20Z</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=1613_-_Numere_15&amp;diff=6698&amp;oldid=prev</id>
		<title>Pop Giulia at 12:44, 20 May 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=1613_-_Numere_15&amp;diff=6698&amp;oldid=prev"/>
		<updated>2023-05-20T12:44:24Z</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 12:44, 20 May 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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Sursa: [https://www.pbinfo.ro/probleme/1613/numere15]&lt;/ins&gt;&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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&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;==Cerința==&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;==Cerința==&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;Se citește un număr natural nenul n. Numărul n1 este format doar din cifrele pare ale lui n. Numărul n2 este format doar din cifrele impare ale lui n. Calculați valoarea absolută a diferenței lor.&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;Se citește un număr natural nenul n. Numărul n1 este format doar din cifrele pare ale lui n. Numărul n2 este format doar din cifrele impare ale lui n. Calculați valoarea absolută a diferenței lor.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pop Giulia</name></author>
	</entry>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=1613_-_Numere_15&amp;diff=5606&amp;oldid=prev</id>
		<title>Pop Giulia: Pagină nouă: ==Cerința== Se citește un număr natural nenul n. Numărul n1 este format doar din cifrele pare ale lui n. Numărul n2 este format doar din cifrele impare ale lui n. Calculați valoarea absolută a diferenței lor.  ==Date de intrare== Programul citește de la tastatură numărul n.  ==Date de ieșire== Programul va afișa pe ecran numărul d, reprezentând valoarea absolută a diferenței dintre n1 și n2.  ==Restricții și precizări== 10 ≤ n &lt; 1.000.000.000 numărul n...</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=1613_-_Numere_15&amp;diff=5606&amp;oldid=prev"/>
		<updated>2023-04-30T10:03:53Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: ==Cerința== Se citește un număr natural nenul n. Numărul n1 este format doar din cifrele pare ale lui n. Numărul n2 este format doar din cifrele impare ale lui n. Calculați valoarea absolută a diferenței lor.  ==Date de intrare== Programul citește de la tastatură numărul n.  ==Date de ieșire== Programul va afișa pe ecran numărul d, reprezentând valoarea absolută a diferenței dintre n1 și n2.  ==Restricții și precizări== 10 ≤ n &amp;lt; 1.000.000.000 numărul n...&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 citește un număr natural nenul n. Numărul n1 este format doar din cifrele pare ale lui n. Numărul n2 este format doar din cifrele impare ale lui n. Calculați valoarea absolută a diferenței lor.&lt;br /&gt;
&lt;br /&gt;
==Date de intrare==&lt;br /&gt;
Programul citește de la tastatură numărul n.&lt;br /&gt;
&lt;br /&gt;
==Date de ieșire==&lt;br /&gt;
Programul va afișa pe ecran numărul d, reprezentând valoarea absolută a diferenței dintre n1 și n2.&lt;br /&gt;
&lt;br /&gt;
==Restricții și precizări==&lt;br /&gt;
10 ≤ n &amp;lt; 1.000.000.000&lt;br /&gt;
numărul n conține cel puțin o cifră pară și cel puțin o cifră impară&lt;br /&gt;
==Exemplu:==&lt;br /&gt;
Intrare&lt;br /&gt;
&lt;br /&gt;
120341&lt;br /&gt;
Ieșire&lt;br /&gt;
&lt;br /&gt;
73&lt;br /&gt;
==Explicație==&lt;br /&gt;
n1 este 204 iar n2 este 131. Diferența este 73.&lt;br /&gt;
&lt;br /&gt;
==Încărcare soluție==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
n = int(input())&lt;br /&gt;
&lt;br /&gt;
n1 = 0&lt;br /&gt;
n2 = 0&lt;br /&gt;
&lt;br /&gt;
while n &amp;gt; 0:&lt;br /&gt;
    cifra = n % 10&lt;br /&gt;
    if cifra % 2 == 0:&lt;br /&gt;
        n1 = n1 * 10 + cifra&lt;br /&gt;
    else:&lt;br /&gt;
        n2 = n2 * 10 + cifra&lt;br /&gt;
    n = n // 10&lt;br /&gt;
&lt;br /&gt;
diferenta = abs(n1 - n2)&lt;br /&gt;
print(diferenta)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pop Giulia</name></author>
	</entry>
</feed>