#368
Se dau două numere naturale a și b. Determinati numărul de palindromuri cuprinse în intervalul determinat de cele două numere.
| Problema | NrPal | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64123607 | Utilizator | |
| Fișier | nrpal.cpp | Dimensiune | 311 B |
| Data încărcării | 18 Aprilie 2026, 18:03 | Scor/rezultat | 0 puncte |
nrpal.cpp: In function ‘int main()’: nrpal.cpp:7:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 7 | if( a < b) | ^~ nrpal.cpp:9:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 9 | b=a; | ^ nrpal.cpp:11:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for( x=a; x<=b; x++) | ^~~ nrpal.cpp:13:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 13 | ogx=ogx*10+c%10; | ^~~ nrpal.cpp:13:16: warning: ‘ogx’ is used uninitialized [-Wuninitialized] 13 | ogx=ogx*10+c%10; | ~~~^~~ nrpal.cpp:5:18: note: ‘ogx’ was declared here 5 | int a, b, x, ogx, P=0, c; | ^~~ nrpal.cpp:11:16: warning: ‘c’ may be used uninitialized [-Wmaybe-uninitialized] 11 | for( x=a; x<=b; x++) | ~^~~ nrpal.cpp:5:28: note: ‘c’ was declared here 5 | int a, b, x, ogx, P=0, c; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 40 | 0 | ||
| 3 | 0.002 secunde | Raspuns gresit. | 40 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrPal 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ă.