<?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=1780_-_Fractie</id>
	<title>1780 - Fractie - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=1780_-_Fractie"/>
	<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=1780_-_Fractie&amp;action=history"/>
	<updated>2026-06-17T05:26:05Z</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=1780_-_Fractie&amp;diff=6233&amp;oldid=prev</id>
		<title>Diana Butuza: /* Cerinţa */</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=1780_-_Fractie&amp;diff=6233&amp;oldid=prev"/>
		<updated>2023-05-09T11:50:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Cerinţa&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 11:50, 9 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 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; 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;Se dau două numere naturale &#039;&#039;&#039;n&#039;&#039;&#039; și &#039;&#039;&#039;m&#039;&#039;&#039;, &#039;&#039;&#039;m&#039;&#039;&#039; fiind prim. Să se afle cel mai mare număr natural &#039;&#039;&#039;x&#039;&#039;&#039;, astfel încât numărul &#039;&#039;&#039;n!/mx&#039;&#039;&#039;să fie natural.&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;Se dau două numere naturale &#039;&#039;&#039;n&#039;&#039;&#039; și &#039;&#039;&#039;m&#039;&#039;&#039;, &#039;&#039;&#039;m&#039;&#039;&#039; fiind prim. Să se afle cel mai mare număr natural &#039;&#039;&#039;x&#039;&#039;&#039;, astfel încât numărul &#039;&#039;&#039;n!/mx&#039;&#039;&#039; să fie natural.&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;== Date de 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;== Date de 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;Programul citește de la tastatură numerele &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; si &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039;.&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 citește de la tastatură numerele &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; si &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039;.&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=1780_-_Fractie&amp;diff=4482&amp;oldid=prev</id>
		<title>Paul Matei: Pagină nouă: == Cerinţa == Se dau două numere naturale &#039;&#039;&#039;n&#039;&#039;&#039; și &#039;&#039;&#039;m&#039;&#039;&#039;, &#039;&#039;&#039;m&#039;&#039;&#039; fiind prim. Să se afle cel mai mare număr natural &#039;&#039;&#039;x&#039;&#039;&#039;, astfel încât numărul &#039;&#039;&#039;n!/mx&#039;&#039;&#039;să fie natural. == Date de intrare == Programul citește de la tastatură numerele &#039;&#039;&#039;n&#039;&#039;&#039; si &#039;&#039;&#039;m&#039;&#039;&#039;. == Date de ieşire == Programul va afișa pe ecran numarul &#039;&#039;&#039;x&#039;&#039;&#039;. == Restricții și precizări == *&#039;&#039;&#039;2 ≤ m ≤ n ≤ 10000&#039;&#039;&#039; *&#039;&#039;&#039;m&#039;&#039;&#039; este prim. == Exemplu == ; Intrare :5 5 ; Ieșire :1 ==Explicație...</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=1780_-_Fractie&amp;diff=4482&amp;oldid=prev"/>
		<updated>2023-04-25T21:22:07Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: == Cerinţa == Se dau două numere naturale &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; și &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039; fiind prim. Să se afle cel mai mare număr natural &amp;#039;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;#039;, astfel încât numărul &amp;#039;&amp;#039;&amp;#039;n!/mx&amp;#039;&amp;#039;&amp;#039;să fie natural. == Date de intrare == Programul citește de la tastatură numerele &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; si &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039;. == Date de ieşire == Programul va afișa pe ecran numarul &amp;#039;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;#039;. == Restricții și precizări == *&amp;#039;&amp;#039;&amp;#039;2 ≤ m ≤ n ≤ 10000&amp;#039;&amp;#039;&amp;#039; *&amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039; este prim. == Exemplu == ; Intrare :5 5 ; Ieșire :1 ==Explicație...&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 două numere naturale &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; și &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039; fiind prim. Să se afle cel mai mare număr natural &amp;#039;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;#039;, astfel încât numărul &amp;#039;&amp;#039;&amp;#039;n!/mx&amp;#039;&amp;#039;&amp;#039;să fie natural.&lt;br /&gt;
== Date de intrare ==&lt;br /&gt;
Programul citește de la tastatură numerele &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039; si &amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
== Date de ieşire ==&lt;br /&gt;
Programul va afișa pe ecran numarul &amp;#039;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
== Restricții și precizări ==&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;2 ≤ m ≤ n ≤ 10000&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;m&amp;#039;&amp;#039;&amp;#039; este prim.&lt;br /&gt;
== Exemplu ==&lt;br /&gt;
; Intrare&lt;br /&gt;
:5 5&lt;br /&gt;
; Ieșire&lt;br /&gt;
:1&lt;br /&gt;
==Explicație==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;5! = 120. 60 = 5 * 2 * 2 * 2 * 3&amp;#039;&amp;#039;&amp;#039;.&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(n, m):&lt;br /&gt;
    # Verifică dacă n și m sunt numere întregi pozitive&lt;br /&gt;
    if isinstance(n, int) and isinstance(m, int) and n &amp;gt; 0 and m &amp;gt; 0:&lt;br /&gt;
        return True&lt;br /&gt;
    else:&lt;br /&gt;
        return False&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;#039;__main__&amp;#039;:&lt;br /&gt;
    # Citește datele de intrare de la utilizator&lt;br /&gt;
    n, m = map(int, input().split())&lt;br /&gt;
&lt;br /&gt;
    # Validează datele de intrare&lt;br /&gt;
    if validare_date(n, m):&lt;br /&gt;
        # Efectuează aceeași calculație ca în codul original&lt;br /&gt;
        p = 0&lt;br /&gt;
        for i in range(1, n+1):&lt;br /&gt;
            aux = i&lt;br /&gt;
            if aux % m == 0:&lt;br /&gt;
                while aux % m == 0:&lt;br /&gt;
                    p += 1&lt;br /&gt;
                    aux = aux // m&lt;br /&gt;
        print(p)&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>Paul Matei</name></author>
	</entry>
</feed>