#2863
Fie k, n și y trei numere naturale. Fie X un șir format din n numere naturale: \( x_1, x_2, x_3, …, x_n \). Fie P produsul numerelor \( y, x_1, x_2, x_3, …, x_n \), adică \( P = y\times x_1\times x_2 \times x_3 \times … \times x_n \). Numărul P este o “k-putere” dacă există un număr natural z astfel încât \( P=z^k \).
Scrieți un program care să citească numerele \( k, n, x_1, x_2, x_3, …, x_n \) și care să determine:
X ce sunt formate doar din cifre identice;y (y ≥ 2) cu proprietatea că numărul \( P = y\times x_1\times x_2 \times x_3 \times … \times x_n \) este o “k-putere”.| Problema | pyk | Operații I/O |
pyk.in/pyk.out
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 8 MB
/
Stivă 8 MB
|
| Id soluție | #63753413 | Utilizator | |
| Fișier | pyk.cpp | Dimensiune | 1.57 KB |
| Data încărcării | 17 Martie 2026, 19:26 | Scor/rezultat | 100 puncte |
pyk.cpp: In function 'int main()': pyk.cpp:8:18: warning: unused variable 'y' [-Wunused-variable] int c, n, k, y, x, xsave, ucif, minx=10001, maxx=0, ok=1, nr=0; ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0 secunde | OK. | 1 | 1 | ||
| 1 | 0 secunde | OK. | 4 | 4 | ||
| 2 | 0 secunde | OK. | 1 | 1 | ||
| 3 | 0 secunde | OK. | 4 | 4 | ||
| 4 | 0 secunde | OK. | 1 | 1 | ||
| 5 | 0 secunde | OK. | 4 | 4 | ||
| 6 | 0 secunde | OK. | 1 | 1 | ||
| 7 | 0 secunde | OK. | 4 | 4 | ||
| 8 | 0 secunde | OK. | 1 | 1 | ||
| 9 | 0 secunde | OK. | 4 | 4 | ||
| 10 | 0.004 secunde | OK. | 1 | 1 | ||
| 11 | 0 secunde | OK. | 4 | 4 | ||
| 12 | 0 secunde | OK. | 1 | 1 | ||
| 13 | 0 secunde | OK. | 4 | 4 | ||
| 14 | 0 secunde | OK. | 1 | 1 | ||
| 15 | 0 secunde | OK. | 4 | 4 | ||
| 16 | 0 secunde | OK. | 1 | 1 | ||
| 17 | 0 secunde | OK. | 4 | 4 | ||
| 18 | 0 secunde | OK. | 1 | 1 | ||
| 19 | 0 secunde | OK. | 4 | 4 | ||
| 20 | 0 secunde | OK. | 4 | 4 | ||
| 21 | 0.004 secunde | OK. | 4 | 4 | ||
| 22 | 0.004 secunde | OK. | 4 | 4 | ||
| 23 | 0.004 secunde | OK. | 4 | 4 | ||
| 24 | 0.004 secunde | OK. | 4 | 4 | ||
| 25 | 0.004 secunde | OK. | 5 | 5 | ||
| 26 | 0.008 secunde | OK. | 5 | 5 | ||
| 27 | 0.004 secunde | OK. | 5 | 5 | ||
| 28 | 0.008 secunde | OK. | 5 | 5 | ||
| 29 | 0.012 secunde | OK. | 5 | 5 | ||
| 30 | 0.008 secunde | OK. | 5 | 5 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pyk 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ă.