#3481
Se dau n numere naturale. Să se afișeze acestea în ordinea crescătoare a numărului de divizori ai fiecăruia, la același număr de divizori crescător după cifra de control, la aceeași cifră de control crescător după prima cifră, iar dacă și prima cifră este aceeași atunci numerele se vor afișa în ordinea crescătoare a valorii lor.
| Problema | sort_div | Operații I/O |
sort_div.in/sort_div.out
|
|---|---|---|---|
| Limita timp | 0.02 secunde | Limita memorie |
Total: 1 MB
/
Stivă 1 MB
|
| Id soluție | #64410104 | Utilizator | |
| Fișier | sort_div.cpp | Dimensiune | 1.23 KB |
| Data încărcării | 05 Mai 2026, 16:45 | Scor/rezultat | 25 puncte |
sort_div.cpp: In function ‘int Div(int)’: sort_div.cpp:20:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 20 | if(x%d==0) | ^~ sort_div.cpp:22:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 22 | if(d*d!=x) | ^~ sort_div.cpp: In function ‘int Pc(int)’: sort_div.cpp:38:5: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 38 | while(x>9) | ^~~~~ sort_div.cpp:40:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 40 | if(x<9) | ^~ sort_div.cpp:42:12: warning: ‘m’ may be used uninitialized [-Wmaybe-uninitialized] 42 | return m; | ^ sort_div.cpp:37:9: note: ‘m’ was declared here 37 | int m; | ^ sort_div.cpp: In function ‘int main()’: sort_div.cpp:62:16: warning: ‘m’ may be used uninitialized [-Wmaybe-uninitialized] 62 | v[i].pc=Pc(v[i].val); | ~~~~~~~^~~~~~~~~~~~~ sort_div.cpp:37:9: note: ‘m’ was declared here 37 | int m; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 5 | 5 | Exemplu | |
| 2 | 0.002 secunde | Raspuns gresit. | 15 | 0 | ||
| 3 | 0.003 secunde | OK. | 20 | 20 | ||
| 4 | 0.007 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.011 secunde | Raspuns gresit. | 20 | 0 | ||
| 6 | 0.013 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 25 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sort_div 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ă.