#4861
Se citește de la tastatură un număr natural n de 3 cifre. Să se verifice dacă numărul citit este un palindrom.
| Problema | pal3 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #59649546 | Utilizator | |
| Fișier | pal3.cpp | Dimensiune | 232 B |
| Data încărcării | 06 Octombrie 2025, 09:50 | Scor/rezultat | 60 puncte |
pal3.cpp: In function 'int main()': pal3.cpp:6:3: warning: left operand of comma operator has no effect [-Wunused-value] x,y,z <= 9; ^ pal3.cpp:6:10: warning: right operand of comma operator has no effect [-Wunused-value] x,y,z <= 9; ^ pal3.cpp:6:7: warning: right operand of comma operator has no effect [-Wunused-value] x,y,z <= 9; ^ pal3.cpp:9:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (x = z) { ^ pal3.cpp:7:12: warning: 'x' is used uninitialized in this function [-Wuninitialized] n = x * 10 * 10 + y * 10 + z * 1; ^ pal3.cpp:7:21: warning: 'y' is used uninitialized in this function [-Wuninitialized] n = x * 10 * 10 + y * 10 + z * 1; ^ pal3.cpp:7:26: warning: 'z' is used uninitialized in this function [-Wuninitialized] n = x * 10 * 10 + y * 10 + z * 1; ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 20 | 20 | ||
| 2 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0 secunde | OK. | 20 | 20 | ||
| 5 | 0 secunde | OK. | 20 | 20 | ||
| Punctaj total | 60 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pal3 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ă.