<?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=0983_-_Ecuatie</id>
	<title>0983 - Ecuatie - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=0983_-_Ecuatie"/>
	<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0983_-_Ecuatie&amp;action=history"/>
	<updated>2026-05-01T04:46:28Z</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=0983_-_Ecuatie&amp;diff=9928&amp;oldid=prev</id>
		<title>Benzar Ioan: Pagină nouă: == Cerința == Se dau a și b numere naturale nenule, cu a &lt; b. Să se determine soluțiile ecuației 1/x+1/y+1/z=a/b , unde x,y,z sunt numere naturale nenule . == Date de intrare == Programul citește de la tastatură numerele naturale nenule a și b, separate prin spațiu. == Date de ieșire == Programul va afișa pe ecran, pe linii separate, soluțiile ecuației în ordinea crescătoare a valorilor lui x, iar la valori egale ale lui x în ordinea crescătoare a valorilor l...</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0983_-_Ecuatie&amp;diff=9928&amp;oldid=prev"/>
		<updated>2024-06-03T12:41:07Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: == Cerința == Se dau a și b numere naturale nenule, cu a &amp;lt; b. Să se determine soluțiile ecuației 1/x+1/y+1/z=a/b , unde x,y,z sunt numere naturale nenule . == Date de intrare == Programul citește de la tastatură numerele naturale nenule a și b, separate prin spațiu. == Date de ieșire == Programul va afișa pe ecran, pe linii separate, soluțiile ecuației în ordinea crescătoare a valorilor lui x, iar la valori egale ale lui x în ordinea crescătoare a valorilor l...&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 dau a și b numere naturale nenule, cu a &amp;lt; b. Să se determine soluțiile ecuației 1/x+1/y+1/z=a/b&lt;br /&gt;
, unde x,y,z sunt numere naturale nenule .&lt;br /&gt;
== Date de intrare ==&lt;br /&gt;
Programul citește de la tastatură numerele naturale nenule a și b, separate prin spațiu.&lt;br /&gt;
== Date de ieșire ==&lt;br /&gt;
Programul va afișa pe ecran, pe linii separate, soluțiile ecuației în ordinea crescătoare a valorilor lui x, iar la valori egale ale lui x în ordinea crescătoare a valorilor lui y . În cazul în care problema nu are soluţii se va afişa mesajul NU ARE SOLUTII.&lt;br /&gt;
== Restricții și precizări ==&lt;br /&gt;
*1 ≤ a &amp;lt; b ≤ 100&lt;br /&gt;
*Se vor afișa numai soluțiile cu x ≤ y ≤ z numere naturale&lt;br /&gt;
== Exemplu 1 ==&lt;br /&gt;
;Intrare&lt;br /&gt;
2 3&lt;br /&gt;
;Iesire&lt;br /&gt;
2 7 42&amp;lt;br&amp;gt;&lt;br /&gt;
2 8 24&amp;lt;br&amp;gt;&lt;br /&gt;
2 9 18&amp;lt;br&amp;gt;&lt;br /&gt;
2 10 15&amp;lt;br&amp;gt;&lt;br /&gt;
2 12 12&amp;lt;br&amp;gt;&lt;br /&gt;
3 4 12&amp;lt;br&amp;gt;&lt;br /&gt;
3 6 6&amp;lt;br&amp;gt;&lt;br /&gt;
4 4 6&lt;br /&gt;
== Rezolvare ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
def main():&lt;br /&gt;
    # Citirea datelor de intrare&lt;br /&gt;
    a, b = map(int, input(&amp;quot;Introduceți valorile a și b, separate prin spațiu: &amp;quot;).strip().split())&lt;br /&gt;
&lt;br /&gt;
    assert 1 &amp;lt;= a &amp;lt; b &amp;lt;= 100, &amp;quot;Restricțiile sunt 1 ≤ a &amp;lt; b ≤ 100&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    solutions = []&lt;br /&gt;
&lt;br /&gt;
    # Generarea soluțiilor&lt;br /&gt;
    print(&amp;quot;Generarea soluțiilor...&amp;quot;)&lt;br /&gt;
    for x in range(1, 1001):&lt;br /&gt;
        for y in range(x, 1001):&lt;br /&gt;
            for z in range(y, 1001):&lt;br /&gt;
                if a * (x * y * z) == b * (x * y + y * z + z * x):&lt;br /&gt;
                    solutions.append((x, y, z))&lt;br /&gt;
                    print(x,y,z)&lt;br /&gt;
&lt;br /&gt;
    # Sortarea soluțiilor în ordine crescătoare a lui x, iar pentru valori egale de x, în ordine crescătoare a lui y și z&lt;br /&gt;
    solutions.sort(key=lambda sol: (sol[0], sol[1], sol[2]))&lt;br /&gt;
&lt;br /&gt;
    if (solutions == 0):&lt;br /&gt;
        print(&amp;quot;NU EXISTA SOLUTII&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;quot;__main__&amp;quot;:&lt;br /&gt;
    main()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Benzar Ioan</name></author>
	</entry>
</feed>