#4571
Se dă un șir cu n elemente, numere naturale. Să se determine câte elemente ale șirului conțin cifra 2 și nu conțin cifra 5 și suma celor care nu conțin cifra 2 dar conțin cifra 5.
| Problema | Cifre25 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64640460 | Utilizator | |
| Fișier | cifre25.cpp | Dimensiune | 526 B |
| Data încărcării | 19 Mai 2026, 22:18 | Scor/rezultat | 80 puncte |
cifre25.cpp: In function ‘int main()’: cifre25.cpp:19:13: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 19 | if(X%10==2) | ^~ cifre25.cpp:22:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 22 | X/=10; | ^ cifre25.cpp:24:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 24 | if(ok2==1&&ok5==0) | ^~ cifre25.cpp:26:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 26 | if(ok5==1&&ok2==0) | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.002 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 80 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cifre25 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ă.