#4719
Dat un număr natural n să se determine cea mai mare cifră pară și cea mai mică cifră impară a sa.
Concurs selectie clasa a 9-a Centru de Excelenta in Informatica - 2024 - Vaslui
| Problema | vesel4 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64670488 | Utilizator | |
| Fișier | vesel4.cpp | Dimensiune | 333 B |
| Data încărcării | 21 Mai 2026, 16:04 | Scor/rezultat | 30 puncte |
vesel4.cpp: In function ‘int main()’: vesel4.cpp:10:11: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 10 | if(n%10>max&&n%2==0) | ^~ vesel4.cpp:12:14: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 12 | n=n/10; | ^ vesel4.cpp:13:11: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 13 | if(n%10<min&&n%2!=0) | ^~ vesel4.cpp:15:14: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 15 | n=n/10; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 2 | 0.002 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 3 | 0.001 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0.001 secunde | OK. | 10 | 10 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 10 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 30 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema vesel4 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ă.