<?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=0140_-_Putere</id>
	<title>0140 - Putere - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=0140_-_Putere"/>
	<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0140_-_Putere&amp;action=history"/>
	<updated>2026-06-17T03:47:56Z</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=0140_-_Putere&amp;diff=6723&amp;oldid=prev</id>
		<title>Pop Giulia at 13:02, 20 May 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0140_-_Putere&amp;diff=6723&amp;oldid=prev"/>
		<updated>2023-05-20T13:02:59Z</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 13:02, 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/140/putere]&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ţă==&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ţă==&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;Scrieţi un program, care pentru două numere naturale date m şi n determină:&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;Scrieţi un program, care pentru două numere naturale date m şi n determină:&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=0140_-_Putere&amp;diff=5632&amp;oldid=prev</id>
		<title>Pop Giulia: Pagină nouă: ==Cerinţă== Scrieţi un program, care pentru două numere naturale date m şi n determină:  a) puterea p definită în enunţ; b) suma s definită în enunţ.  ==Date de intrare== Fişierul de intrare putere.in conţine pe prima linie numerele m şi n, separate între ele printr-un spaţiu.  ==Date de ieşire== Fişierul de ieşire putere.out va conţine, pe prima linie p şi pe a doua linie s.  ==Restricţii şi precizări== 0 &lt;m,n&lt; 2000000001 Toate cifrele lui n sunt nen...</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=0140_-_Putere&amp;diff=5632&amp;oldid=prev"/>
		<updated>2023-04-30T10:44:20Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: ==Cerinţă== Scrieţi un program, care pentru două numere naturale date m şi n determină:  a) puterea p definită în enunţ; b) suma s definită în enunţ.  ==Date de intrare== Fişierul de intrare putere.in conţine pe prima linie numerele m şi n, separate între ele printr-un spaţiu.  ==Date de ieşire== Fişierul de ieşire putere.out va conţine, pe prima linie p şi pe a doua linie s.  ==Restricţii şi precizări== 0 &amp;lt;m,n&amp;lt; 2000000001 Toate cifrele lui n sunt nen...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Cerinţă==&lt;br /&gt;
Scrieţi un program, care pentru două numere naturale date m şi n determină:&lt;br /&gt;
&lt;br /&gt;
a) puterea p definită în enunţ;&lt;br /&gt;
b) suma s definită în enunţ.&lt;br /&gt;
&lt;br /&gt;
==Date de intrare==&lt;br /&gt;
Fişierul de intrare putere.in conţine pe prima linie numerele m şi n, separate între ele printr-un spaţiu.&lt;br /&gt;
&lt;br /&gt;
==Date de ieşire==&lt;br /&gt;
Fişierul de ieşire putere.out va conţine, pe prima linie p şi pe a doua linie s.&lt;br /&gt;
&lt;br /&gt;
==Restricţii şi precizări==&lt;br /&gt;
0 &amp;lt;m,n&amp;lt; 2000000001&lt;br /&gt;
Toate cifrele lui n sunt nenule.&lt;br /&gt;
m şi n au acelaşi număr de cifre.&lt;br /&gt;
==Exemplu==&lt;br /&gt;
putere.in&lt;br /&gt;
&lt;br /&gt;
624 253&lt;br /&gt;
putere.out&lt;br /&gt;
&lt;br /&gt;
64&lt;br /&gt;
132	&lt;br /&gt;
==Explicaţie==&lt;br /&gt;
m=624, n=253.&lt;br /&gt;
p= 43 , adică p=64 s= 43 + 25 + 62 , adică s=132.&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;
with open(&amp;#039;putere.in&amp;#039;, &amp;#039;r&amp;#039;) as f_in, open(&amp;#039;putere.out&amp;#039;, &amp;#039;w&amp;#039;) as f_out:&lt;br /&gt;
    m, n = map(int, f_in.readline().split())&lt;br /&gt;
    p = int(str(m)[-1])&lt;br /&gt;
    s = p&lt;br /&gt;
    while m &amp;gt; 0:&lt;br /&gt;
        p = (p * n) % 10&lt;br /&gt;
        s += p&lt;br /&gt;
        m //= 10&lt;br /&gt;
        n = int(str(n * n)[-len(str(m)):])&lt;br /&gt;
    f_out.write(str(p) + &amp;#039;\n&amp;#039;)&lt;br /&gt;
    f_out.write(str(s) + &amp;#039;\n&amp;#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pop Giulia</name></author>
	</entry>
</feed>