#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 | #64730240 | Utilizator | |
| Fișier | vesel4.cpp | Dimensiune | 596 B |
| Data încărcării | 26 Mai 2026, 14:23 | Scor/rezultat | 0 puncte |
vesel4.cpp: In function ‘int main()’: vesel4.cpp:15:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 15 | if(n%10%2==1 && n%10<=cmin) | ^~ vesel4.cpp:17:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 17 | ok=1; | ^~ vesel4.cpp:18:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 18 | if(n%10%2==0 && n%10>=cmax) | ^~ vesel4.cpp:20:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 20 | k=1; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | Depășit | Limita de timp depășită | 10 | 0 | Exemplu | |
| 2 | Depășit | Limita de timp depășită | 10 | 0 | Exemplu | |
| 3 | Depășit | Limita de timp depășită | 10 | 0 | Exemplu | |
| 4 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 7 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 8 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 9 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 10 | Depășit | Limita de timp depășită | 10 | 0 | ||
| Punctaj total | 0 | |||||
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ă.