#2415
Se dau n
întrebări de forma: Câte palindromuri există în intervalul [a,b]
?, unde a
și b
sunt numere naturale date, cu a ≤ b
.
Problema | nr_pal | Operații I/O |
![]() nr_pal.in /nr_pal.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 4 MB
/
Stivă 2 MB
|
Id soluție | #57778948 | Utilizator | |
Fișier | nr_pal.cpp | Dimensiune | 447 B |
Data încărcării | 15 Aprilie 2025, 19:43 | Scor / rezultat | Eroare de compilare |
nr_pal.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> #include ‹iostream> ^ nr_pal.cpp:2:10: error: #include expects "FILENAME" or <FILENAME> #include ‹fstream> ^ nr_pal.cpp:11:1: error: stray '\357' in program { ^ nr_pal.cpp:11:1: error: stray '\275' in program nr_pal.cpp:11:1: error: stray '\233' in program nr_pal.cpp:22:1: error: stray '\357' in program } ^ nr_pal.cpp:22:1: error: stray '\275' in program nr_pal.cpp:22:1: error: stray '\235' in program nr_pal.cpp:30:1: error: stray '\302' in program return 0; ^ nr_pal.cpp:30:1: error: stray '\240' in program nr_pal.cpp: In function 'int main()': nr_pal.cpp:6:1: error: 'ifstream' was not declared in this scope ifstream fin("nr_pal.in"); ^ nr_pal.cpp:6:10: error: expected ';' before 'fin' ifstream fin("nr_pal.in"); ^ nr_pal.cpp:7:1: error: 'ofstream' was not declared in this scope ofstream fout("nr_pal.out"); ^ nr_pal.cpp:7:10: error: expected ';' before 'fout' ofstream fout("nr_pal.out"); ^ nr_pal.cpp:9:1: error: expected initializer before 'fin' fin >> n; ^ nr_pal.cpp:12:1: error: 'fin' was not declared in this scope fin > a >> b; ^ nr_pal.cpp:13:3: error: lvalue required as left operand of assignment 5 = 0; ^ nr_pal.cpp:14:6: error: 'i' was not declared in this scope for (i = a; i <= b; i++) ^ nr_pal.cpp:17:14: error: expected unqualified-id before numeric constant int num = 1, 0g = 0; ^ nr_pal.cpp:24:1: error: 'S' was not declared in this scope S++; ^ nr_pal.cpp:26:1: error: 'fout' was not declared in this scope fout <<s << endl; ^ nr_pal.cpp:26:13: error: 'endl' was not declared in this scope fout <<s << endl; ^ nr_pal.cpp:28:1: error: 'fin' was not declared in this scope fin. close(); ^ nr_pal.cpp:29:1: error: 'fout' was not declared in this scope fout. close; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema nr_pal 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ă.