#3301
Se dă un număr natural n. Să se scrie un program care determină și afișează pe ecran numărul de numere mai mici sau egale cu n care au exact 9 divizori.
| Problema | nrdiv9 | Operații I/O |
nrdiv9.in/nrdiv9.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 1 MB
/
Stivă 1 MB
|
| Id soluție | #64363131 | Utilizator | |
| Fișier | nrdiv9.cpp | Dimensiune | 934 B |
| Data încărcării | 03 Mai 2026, 13:42 | Scor/rezultat | 15 puncte |
nrdiv9.cpp: In function ‘int main()’: nrdiv9.cpp:32:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 32 | for(int j = 0; j < v2.size(); j++) | ~~^~~~~~~~~~~ nrdiv9.cpp:33:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 33 | for(int i = j+1; i < v2.size() - 1; i++){ | ~~^~~~~~~~~~~~~~~ nrdiv9.cpp:32:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 32 | for(int j = 0; j < v2.size(); j++) | ^~~ nrdiv9.cpp:39:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 39 | for(int i = 0; i < v2.size(); i++){ | ^~~ nrdiv9.cpp:39:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 39 | for(int i = 0; i < v2.size(); i++){ | ~~^~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Corect ! | 5 | 5 | ||
| 2 | 0.001 secunde | Corect ! | 5 | 5 | Exemplu | |
| 3 | 0.002 secunde | Corect ! | 5 | 5 | Exemplu | |
| 4 | 0.002 secunde | Incorect ! | 10 | 0 | ||
| 5 | 0.001 secunde | Incorect ! | 10 | 0 | ||
| 6 | 0.001 secunde | Incorect ! | 10 | 0 | ||
| 7 | 0.003 secunde | Incorect ! | 10 | 0 | ||
| 8 | 0.01 secunde | Incorect ! | 10 | 0 | ||
| 9 | 0.005 secunde | Incorect ! | 20 | 0 | ||
| 10 | 0.001 secunde | Incorect ! | 15 | 0 | ||
| Punctaj total | 15 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema nrdiv9 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ă.