#1311
Se citește de la tastatură un număr natural de 3 cifre. Să se stabilească dacă are toate cifrele egale.
| Problema | CifEgale | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64955812 | Utilizator | |
| Fișier | cifegale.cpp | Dimensiune | 275 B |
| Data încărcării | 23 Iunie 2026, 17:59 | Scor/rezultat | 50 puncte |
cifegale.cpp: In function ‘int main()’: cifegale.cpp:13:7: warning: suggest parentheses around comparison in operand of ‘==’ [-Wparentheses] 13 | if(n1==n2==n3) | ~~^~~~ cifegale.cpp:4:8: warning: variable ‘c1’ set but not used [-Wunused-but-set-variable] 4 | {int n,c1,c2,c3,n1,n2,n3; | ^~ cifegale.cpp:4:11: warning: variable ‘c2’ set but not used [-Wunused-but-set-variable] 4 | {int n,c1,c2,c3,n1,n2,n3; | ^~ cifegale.cpp:4:14: warning: variable ‘c3’ set but not used [-Wunused-but-set-variable] 4 | {int n,c1,c2,c3,n1,n2,n3; | ^~ cifegale.cpp:6:10: warning: ‘n3’ is used uninitialized [-Wuninitialized] 6 | while(n3!=0) | ~~^~~ cifegale.cpp:4:23: note: ‘n3’ was declared here 4 | {int n,c1,c2,c3,n1,n2,n3; | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 3 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0.002 secunde | OK. | 10 | 10 | ||
| 8 | 0.001 secunde | OK. | 10 | 10 | ||
| 9 | 0.002 secunde | OK. | 10 | 10 | ||
| 10 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 50 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifEgale 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ă.