#955
Miny
Fie N
un număr natural nenul şi N
numere naturale nenule: x
1
, x
2
,…, x
N
.
Fie P
produsul acestor N numere, P=
x
1
•x
2
•...•x
N
.
Scrieţi un program care să citească numerele N
, x
1
, x
2
,…, x
N
şi apoi să determine:
a) cifra zecilor produsului P
;
b) cel mai mic număr natural Y
, pentru care există numărul natural K
astfel încât Y
K
=P
.
Concursul National Grigore Moisil, Lugoj, 2013
Problema | Miny | Operații I/O |
miny.in /miny.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50509332 | Utilizator | |
Fișier | miny.cpp | Dimensiune | 1.99 KB |
Data încărcării | 12 Aprilie 2024, 09:17 | Scor / rezultat | 17 puncte |
miny.cpp: In function 'int main()': miny.cpp:20:55: warning: overflow in implicit constant conversion [-Woverflow] int n, b = 0, nr, p = 1, u2, cn, maxi = 0, mini = 10000000000, q = 0, nn,d, cm, mini2 = 1000000, maxi2 = 0, pf = 1; // 12 5 60 25 4 36 = 2*2*3*5*2*3*2*5*5*5*2*2*2*2*3*3= 2^8*3^4*5^4 ^ miny.cpp:20:48: warning: unused variable 'mini' [-Wunused-variable] int n, b = 0, nr, p = 1, u2, cn, maxi = 0, mini = 10000000000, q = 0, nn,d, cm, mini2 = 1000000, maxi2 = 0, pf = 1; // 12 5 60 25 4 36 = 2*2*3*5*2*3*2*5*5*5*2*2*2*2*3*3= 2^8*3^4*5^4 ^ miny.cpp:20:75: warning: variable 'nn' set but not used [-Wunused-but-set-variable] int n, b = 0, nr, p = 1, u2, cn, maxi = 0, mini = 10000000000, q = 0, nn,d, cm, mini2 = 1000000, maxi2 = 0, pf = 1; // 12 5 60 25 4 36 = 2*2*3*5*2*3*2*5*5*5*2*2*2*2*3*3= 2^8*3^4*5^4 ^ miny.cpp:20:103: warning: unused variable 'maxi2' [-Wunused-variable] int n, b = 0, nr, p = 1, u2, cn, maxi = 0, mini = 10000000000, q = 0, nn,d, cm, mini2 = 1000000, maxi2 = 0, pf = 1; // 12 5 60 25 4 36 = 2*2*3*5*2*3*2*5*5*5*2*2*2*2*3*3= 2^8*3^4*5^4 ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Corect a ! Incorect b ! | 5 | 1 | Exemplu | |
2 | 0 secunde | Corect a ! Incorect b ! | 5 | 1 | Exemplu | |
3 | 0 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
4 | 0 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
5 | 0 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
6 | 0 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
7 | 0 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
8 | 0 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
9 | Depășit | Limita de timp depășită | 5 | 0 | ||
10 | Depășit | Limita de timp depășită | 5 | 0 | ||
11 | Depășit | Limita de timp depășită | 5 | 0 | ||
12 | 0 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
13 | 0.004 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
14 | 0.004 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
15 | 0.004 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
16 | 0.004 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
17 | 0.004 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
18 | 0.008 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
19 | 0.008 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
20 | 0.008 secunde | Corect a ! Incorect b ! | 5 | 1 | ||
Punctaj total | 17 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Miny face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.