#245
Se dă un număr natural n. Să se determine numărul din intervalul [1,n] care are număr maxim de divizori.
| Problema | NrDivMax | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64312335 | Utilizator | |
| Fișier | nrdivmax.cpp | Dimensiune | 610 B |
| Data încărcării | 29 Aprilie 2026, 09:46 | Scor/rezultat | 0 puncte |
nrdivmax.cpp: In function ‘int main()’: nrdivmax.cpp:10:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 10 | for(d=2;d*d<a;d++) | ^~~ nrdivmax.cpp:13:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 13 | if(d*d==a) | ^~ nrdivmax.cpp:21:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 21 | for(d=2;d*d<b;d++) | ^~~ nrdivmax.cpp:24:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 24 | if(d*d==b) | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrDivMax 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ă.