<?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=1045_-_Imprimanta</id>
	<title>1045 - Imprimanta - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.universitas.ro/index.php?action=history&amp;feed=atom&amp;title=1045_-_Imprimanta"/>
	<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=1045_-_Imprimanta&amp;action=history"/>
	<updated>2026-05-01T11:21:59Z</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=1045_-_Imprimanta&amp;diff=6722&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=1045_-_Imprimanta&amp;diff=6722&amp;oldid=prev"/>
		<updated>2023-05-20T13:02:21Z</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/1045/imprimanta]&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;==Enunt==&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;==Enunt==&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;Cif-Oji6 este o imprimantă matriceală numită şi imprimantă cu ace, deoarece tipărirea se realizează prin impactul acelor capului de imprimare pe o bandă cu tuş.&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;Cif-Oji6 este o imprimantă matriceală numită şi imprimantă cu ace, deoarece tipărirea se realizează prin impactul acelor capului de imprimare pe o bandă cu tuş.&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=1045_-_Imprimanta&amp;diff=5631&amp;oldid=prev</id>
		<title>Pop Giulia: /* Solutie */</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=1045_-_Imprimanta&amp;diff=5631&amp;oldid=prev"/>
		<updated>2023-04-30T10:41:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Solutie&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 10:41, 30 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-l48&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&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;5* (5 puncte pentru cifra 1) = 25 puncte.&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;5* (5 puncte pentru cifra 1) = 25 puncte.&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;==Solutie==&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;==Solutie==&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;&amp;lt;syntaxhighlight lang=&quot;python&quot; line&amp;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;def count_points(n, digits):&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;def count_points(n, digits):&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;     points = 0&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;     points = 0&lt;/div&gt;&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-l63&quot;&gt;Line 63:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 64:&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;             break&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;             break&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;     return min_digit&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;     return min_digit&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;&amp;lt;/syntaxhighlight&amp;gt;&lt;/ins&gt;&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=1045_-_Imprimanta&amp;diff=5060&amp;oldid=prev</id>
		<title>Pop Giulia: Pagină nouă: ==Enunt== Cif-Oji6 este o imprimantă matriceală numită şi imprimantă cu ace, deoarece tipărirea se realizează prin impactul acelor capului de imprimare pe o bandă cu tuş. Acele sunt aranjate într-o grilă dreptunghiulară formată din 5 rânduri de ace, pe fiecare rând aflându-se la distanţe egale câte 3 ace, aşa cum se observă în figura alăturată. Prin acţionarea diferitelor combinaţii de ace din grilă, se defineşte forma fiecărei cifre ce permite tip...</title>
		<link rel="alternate" type="text/html" href="https://wiki.universitas.ro/index.php?title=1045_-_Imprimanta&amp;diff=5060&amp;oldid=prev"/>
		<updated>2023-04-27T18:37:57Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: ==Enunt== Cif-Oji6 este o imprimantă matriceală numită şi imprimantă cu ace, deoarece tipărirea se realizează prin impactul acelor capului de imprimare pe o bandă cu tuş. Acele sunt aranjate într-o grilă dreptunghiulară formată din 5 rânduri de ace, pe fiecare rând aflându-se la distanţe egale câte 3 ace, aşa cum se observă în figura alăturată. Prin acţionarea diferitelor combinaţii de ace din grilă, se defineşte forma fiecărei cifre ce permite tip...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Enunt==&lt;br /&gt;
Cif-Oji6 este o imprimantă matriceală numită şi imprimantă cu ace, deoarece tipărirea se realizează prin impactul acelor capului de imprimare pe o bandă cu tuş.&lt;br /&gt;
Acele sunt aranjate într-o grilă dreptunghiulară formată din 5 rânduri de ace, pe fiecare rând aflându-se la distanţe egale câte 3 ace, aşa cum se observă în figura alăturată.&lt;br /&gt;
Prin acţionarea diferitelor combinaţii de ace din grilă, se defineşte forma fiecărei cifre ce permite tipărirea acesteia prin puncte, în felul următor:&lt;br /&gt;
De exemplu, cifra 2 va fi tipărită prin 11 puncte ca rezultat al acţionării a 11 ace din grilă: din primul rând de ace al grilei se vor acţiona toate cele 3 ace, din următorul rând doar acul din dreapta, apoi de pe următorul rând toate cele 3 ace, apoi acul din stânga de pe penultimul rând iar din ultimul rând toate cele 3 ace.&lt;br /&gt;
&lt;br /&gt;
==Cerințe==&lt;br /&gt;
a) Ştiind că imprimanta Cif-Oji6 a tipărit numărul N, determinaţi care este cea mai mare cifră a numărul N pentru care s-a acţionat un număr minim de ace ale grilei.&lt;br /&gt;
b) Ştiind că imprimanta mai are tuş pe bandă doar pentru imprimarea a K puncte, determinaţi cel mai mare număr natural ce poate fi tipărit prin exact K puncte.&lt;br /&gt;
&lt;br /&gt;
==Date de intrare==&lt;br /&gt;
Fișierul de intrare imprimanta.in conține pe prima linie două numere naturale N şi K separate printr-un spaţiu, unde N reprezintă numărul tipărit de imprimantă iar K numărul de puncte pentru care imprimanta mai are tuş.&lt;br /&gt;
&lt;br /&gt;
==Date de ieșire==&lt;br /&gt;
Fișierul de ieșire imprimanta.out va conține:&lt;br /&gt;
&lt;br /&gt;
pe prima linie un singur număr natural ce reprezintă cea mai mare cifră a numărul N pentru care s-a acţionat un număr minim de ace ale grilei.&lt;br /&gt;
pe cea de-a doua linie a fişierului se va scrie cel mai mare număr natural ce poate fi tipărit prin K puncte.&lt;br /&gt;
Restricții și precizări&lt;br /&gt;
10 ≤ N ≤ 1015&lt;br /&gt;
14 ≤ K ≤ 100000&lt;br /&gt;
Pentru rezolvarea corectă a cerinţei a) se acordă 30% din punctajul fiecărui test iar pentru rezolvarea corectă a cerinţei b) se acordă 70% din punctajul fiecărui test.&lt;br /&gt;
==Exemplul 1==&lt;br /&gt;
imprimanta.in&lt;br /&gt;
&lt;br /&gt;
2852 16&lt;br /&gt;
imprimanta.out&lt;br /&gt;
&lt;br /&gt;
5&lt;br /&gt;
74&lt;br /&gt;
==Explicație==&lt;br /&gt;
Pentru tipărirea cifrei 2 s-au acţionat 11 ace, pentru cifra 8 s-au acţionat 13 ace iar pentru cifra 5 tot 11 ace. Numărul minim de ace pentru tipărirea unei cifre este 11.&lt;br /&gt;
5 este cea mai mare cifră a numărului 2852 ce a fost tipărită cu 11 ace.&lt;br /&gt;
Cel mai mare număr natural ce poate fi tipărit prin 16 puncte este 74&lt;br /&gt;
7 puncte (pentru cifra 7) + 9 puncte (pentru cifra 4) = 16 puncte.&lt;br /&gt;
&lt;br /&gt;
==Exemplul 2==&lt;br /&gt;
imprimanta.in&lt;br /&gt;
&lt;br /&gt;
88 25&lt;br /&gt;
imprimanta.out&lt;br /&gt;
&lt;br /&gt;
8&lt;br /&gt;
11111&lt;br /&gt;
==Explicație==&lt;br /&gt;
Pentru tipărirea cifrei 8 s-au acţionat 13 ace.&lt;br /&gt;
Cel mai mare număr natural ce poate fi tipărit prin 25 de puncte este 11111&lt;br /&gt;
5* (5 puncte pentru cifra 1) = 25 puncte.&lt;br /&gt;
==Solutie==&lt;br /&gt;
def count_points(n, digits):&lt;br /&gt;
    points = 0&lt;br /&gt;
    for d in str(n):&lt;br /&gt;
        points += digits[d]&lt;br /&gt;
    return points&lt;br /&gt;
def find_min_digit(digits):&lt;br /&gt;
    min_digit = 9&lt;br /&gt;
    min_ace = float(&amp;#039;inf&amp;#039;)&lt;br /&gt;
    for i in range(9, -1, -1):&lt;br /&gt;
        if digits[i] &amp;lt;= min_ace:&lt;br /&gt;
            min_ace = digits[i]&lt;br /&gt;
            min_digit = i&lt;br /&gt;
        if digits[i] &amp;gt; min_ace:&lt;br /&gt;
            break&lt;br /&gt;
    return min_digit&lt;/div&gt;</summary>
		<author><name>Pop Giulia</name></author>
	</entry>
</feed>