<?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=3211_-_Cump%C4%83r%C4%83turi1</id>
	<title>3211 - Cumpărături1 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=3211_-_Cump%C4%83r%C4%83turi1"/>
	<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=3211_-_Cump%C4%83r%C4%83turi1&amp;action=history"/>
	<updated>2026-05-01T04:50:21Z</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=3211_-_Cump%C4%83r%C4%83turi1&amp;diff=4078&amp;oldid=prev</id>
		<title>Vardai Erwin: /* Exemplul 1 */</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=3211_-_Cump%C4%83r%C4%83turi1&amp;diff=4078&amp;oldid=prev"/>
		<updated>2023-04-22T17:17:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Exemplul 1&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 17:17, 22 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-l22&quot;&gt;Line 22:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 22:&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;br&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;br&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; &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;:Datele de intrare corespund restricțiilor impuse.&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;: N&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;: N&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;br&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;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Vardai Erwin</name></author>
	</entry>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=3211_-_Cump%C4%83r%C4%83turi1&amp;diff=4077&amp;oldid=prev</id>
		<title>Vardai Erwin: /* Date de ieșire */</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=3211_-_Cump%C4%83r%C4%83turi1&amp;diff=4077&amp;oldid=prev"/>
		<updated>2023-04-22T17:16:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Date de ieșire&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 17:16, 22 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-l11&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&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;br&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;br&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;==Date de 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;==Date de 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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Programul &lt;/del&gt;afișează pe ecran textul &#039;&#039;&#039;precizat&#039;&#039;&#039; în enunț.&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;Dacă datele sunt introduse corect, pe ecran se va afișa: &quot;Datele de intrare corespund restricțiilor impuse.&quot; și programul &lt;/ins&gt;afișează pe ecran textul &#039;&#039;&#039;precizat&#039;&#039;&#039; în enunț. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;În caz contrar, se va afișa pe ecran: &quot;Datele de intrare nu corespund restricțiilor impuse.&quot;&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;br&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;br&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;==Restricții și precizări==&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;==Restricții și precizări==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Vardai Erwin</name></author>
	</entry>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=3211_-_Cump%C4%83r%C4%83turi1&amp;diff=2561&amp;oldid=prev</id>
		<title>Tuca Liviu Razvan: /* Restricții de precizări */</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=3211_-_Cump%C4%83r%C4%83turi1&amp;diff=2561&amp;oldid=prev"/>
		<updated>2023-04-02T19:14:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Restricții de precizări&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 19:14, 2 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-l13&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&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;Programul afișează pe ecran textul &amp;#039;&amp;#039;&amp;#039;precizat&amp;#039;&amp;#039;&amp;#039; în enunț.&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;Programul afișează pe ecran textul &amp;#039;&amp;#039;&amp;#039;precizat&amp;#039;&amp;#039;&amp;#039; în enunț.&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;br&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;br&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;==Restricții &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;de &lt;/del&gt;precizări==&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;==Restricții &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;și &lt;/ins&gt;precizări==&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;1 ≤ &amp;#039;&amp;#039;&amp;#039;S , c , n&amp;#039;&amp;#039;&amp;#039; ≤ 1.000.000.000&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;1 ≤ &amp;#039;&amp;#039;&amp;#039;S , c , n&amp;#039;&amp;#039;&amp;#039; ≤ 1.000.000.000&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;br&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;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tuca Liviu Razvan</name></author>
	</entry>
	<entry>
		<id>https://wiki.universitas.ro/index.php?title=3211_-_Cump%C4%83r%C4%83turi1&amp;diff=2387&amp;oldid=prev</id>
		<title>Tuca Liviu Razvan: Pagină nouă: ==Cerință== Gigel are &#039;&#039;&#039;S lei&#039;&#039;&#039;. O ciocolata costă &#039;&#039;&#039;c lei&#039;&#039;&#039;, iar o napolitană costă &#039;&#039;&#039;n lei&#039;&#039;&#039;. Gigel poate să cumpere fie ciocolate, fie napolitane, cu condiția să cheltuiască &#039;&#039;&#039;întreaga sumă&#039;&#039;&#039;. Scrieți un program care să citească numerele &#039;&#039;&#039;S c n&#039;&#039;&#039; și să afișeze pe ecran:  textul &#039;&#039;&#039;CN&#039;&#039;&#039; dacă Gigel poate alege să cumpere ciocolate sau napolitane; textul &#039;&#039;&#039;C&#039;&#039;&#039; dacă Gigel poate să cumpere numai ciocolate; textul &#039;&#039;&#039;N&#039;&#039;&#039; dacă Gigel poate să...</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=3211_-_Cump%C4%83r%C4%83turi1&amp;diff=2387&amp;oldid=prev"/>
		<updated>2023-04-02T12:35:01Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: ==Cerință== Gigel are &amp;#039;&amp;#039;&amp;#039;S lei&amp;#039;&amp;#039;&amp;#039;. O ciocolata costă &amp;#039;&amp;#039;&amp;#039;c lei&amp;#039;&amp;#039;&amp;#039;, iar o napolitană costă &amp;#039;&amp;#039;&amp;#039;n lei&amp;#039;&amp;#039;&amp;#039;. Gigel poate să cumpere fie ciocolate, fie napolitane, cu condiția să cheltuiască &amp;#039;&amp;#039;&amp;#039;întreaga sumă&amp;#039;&amp;#039;&amp;#039;. Scrieți un program care să citească numerele &amp;#039;&amp;#039;&amp;#039;S c n&amp;#039;&amp;#039;&amp;#039; și să afișeze pe ecran:  textul &amp;#039;&amp;#039;&amp;#039;CN&amp;#039;&amp;#039;&amp;#039; dacă Gigel poate alege să cumpere ciocolate sau napolitane; textul &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; dacă Gigel poate să cumpere numai ciocolate; textul &amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039; dacă Gigel poate să...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Cerință==&lt;br /&gt;
Gigel are &amp;#039;&amp;#039;&amp;#039;S lei&amp;#039;&amp;#039;&amp;#039;. O ciocolata costă &amp;#039;&amp;#039;&amp;#039;c lei&amp;#039;&amp;#039;&amp;#039;, iar o napolitană costă &amp;#039;&amp;#039;&amp;#039;n lei&amp;#039;&amp;#039;&amp;#039;. Gigel poate să cumpere fie ciocolate, fie napolitane, cu condiția să cheltuiască &amp;#039;&amp;#039;&amp;#039;întreaga sumă&amp;#039;&amp;#039;&amp;#039;. Scrieți un program care să citească numerele &amp;#039;&amp;#039;&amp;#039;S c n&amp;#039;&amp;#039;&amp;#039; și să afișeze pe ecran:&lt;br /&gt;
&lt;br /&gt;
textul &amp;#039;&amp;#039;&amp;#039;CN&amp;#039;&amp;#039;&amp;#039; dacă Gigel poate alege să cumpere ciocolate sau napolitane;&lt;br /&gt;
textul &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039; dacă Gigel poate să cumpere numai ciocolate;&lt;br /&gt;
textul &amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039; dacă Gigel poate să cumpere numai napolitane;&lt;br /&gt;
textul &amp;#039;&amp;#039;&amp;#039;nimic&amp;#039;&amp;#039;&amp;#039; dacă Gigel nu poate să cumpere nici ciocolate, nici napolitane.&lt;br /&gt;
&lt;br /&gt;
==Date de intrare==&lt;br /&gt;
Programul citește de la tastatură &amp;#039;&amp;#039;&amp;#039;numerele naturale S C N&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Date de ieșire==&lt;br /&gt;
Programul afișează pe ecran textul &amp;#039;&amp;#039;&amp;#039;precizat&amp;#039;&amp;#039;&amp;#039; în enunț.&lt;br /&gt;
&lt;br /&gt;
==Restricții de precizări==&lt;br /&gt;
1 ≤ &amp;#039;&amp;#039;&amp;#039;S , c , n&amp;#039;&amp;#039;&amp;#039; ≤ 1.000.000.000&lt;br /&gt;
&lt;br /&gt;
==Exemplul 1==&lt;br /&gt;
;Intrare&lt;br /&gt;
&lt;br /&gt;
:15 4 3&lt;br /&gt;
&lt;br /&gt;
;Ieșire&lt;br /&gt;
&lt;br /&gt;
: N&lt;br /&gt;
&lt;br /&gt;
==Explicatie==&lt;br /&gt;
Gigel are 15 lei, o ciocolată costă 4 lei, iar o napolitană costă 3 lei. Poate cumpăra 5 napolitane, dar nu poate cumpăra ciocolate, deoarece &amp;#039;&amp;#039;&amp;#039;nu ar cheltui întreaga sumă&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Rezolvare==&lt;br /&gt;
===Rezolvare ver. 1===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot; start=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
def validare(S, c, n):&lt;br /&gt;
    # Verificăm dacă valorile intră în intervalul [1, 1000000000].&lt;br /&gt;
    if 1 &amp;lt;= S &amp;lt;= 1000000000 and 1 &amp;lt;= c &amp;lt;= 1000000000 and 1 &amp;lt;= n &amp;lt;= 1000000000:&lt;br /&gt;
        # Returnăm True dacă valorile sunt valide.&lt;br /&gt;
        return True&lt;br /&gt;
    else:&lt;br /&gt;
        # Altfel, returnăm False.&lt;br /&gt;
        return False&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def alege_produsele(S, c, n):&lt;br /&gt;
    # Verificăm condițiile cerinței și afișăm mesajul corespunzător.&lt;br /&gt;
    if S % c == 0 and S % n != 0:&lt;br /&gt;
        print(&amp;quot;C&amp;quot;)&lt;br /&gt;
    elif S % c != 0 and S % n == 0:&lt;br /&gt;
        print(&amp;quot;N&amp;quot;)&lt;br /&gt;
    elif S % c == 0 and S % n == 0:&lt;br /&gt;
        print(&amp;quot;CN&amp;quot;)&lt;br /&gt;
    else:&lt;br /&gt;
        print(&amp;quot;nimic&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;#039;__main__&amp;#039;:&lt;br /&gt;
    # Citim valorile de la tastatură.&lt;br /&gt;
    S = int(input(&amp;quot;Introduceti suma de bani pe care Gigel o are: &amp;quot;))&lt;br /&gt;
    c = int(input(&amp;quot;Introduceti pretul unei ciocolate: &amp;quot;))&lt;br /&gt;
    n = int(input(&amp;quot;Introduceti pretul unei napolitane: &amp;quot;))&lt;br /&gt;
&lt;br /&gt;
    # Verificăm dacă valorile sunt valide.&lt;br /&gt;
    if validare(S, c, n):&lt;br /&gt;
        print(&amp;quot;Datele de intrare corespund restricțiilor impuse.&amp;quot;)&lt;br /&gt;
        # Apelăm funcția alege_produsele dacă valorile sunt valide.&lt;br /&gt;
        alege_produsele(S, c, n)&lt;br /&gt;
    else:&lt;br /&gt;
        print(&amp;quot;Datele de intrare nu corespund restricțiilor impuse.&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tuca Liviu Razvan</name></author>
	</entry>
</feed>