#269
Se dau n numere naturale şi un număr natural k. Afişaţi în ordine crescătoare acele numere date care sunt puteri ale lui k.
Variante Bacalaureat 2009
| Problema | PuteriK | Operații I/O |
puterik.in/puterik.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64455460 | Utilizator | |
| Fișier | puterik.cpp | Dimensiune | 2.57 KB |
| Data încărcării | 07 Mai 2026, 19:44 | Scor/rezultat | 100 puncte |
puterik.cpp: In function ‘void printVector(const std::vector<int>&)’: puterik.cpp:9:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 9 | for (int idx = 0; idx < arr.size() - 1; idx++) { | ~~~~^~~~~~~~~~~~~~~~ puterik.cpp: In function ‘void readVector(std::vector<int>&)’: puterik.cpp:16:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 16 | for (int idx = 0; idx < arr.size(); idx++) { | ~~~~^~~~~~~~~~~~ puterik.cpp: In function ‘int main()’: puterik.cpp:91:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 91 | for (int idx = 1; idx < kExponents.size(); idx++) { | ~~~~^~~~~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 40 | 40 | ||
| 3 | 0.002 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PuteriK 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ă.