#3622
Se dă un interval [l,r]. Aflaţi câte perechi de numere pare se pot forma alegând două numere din interval.
| Problema | perechipare | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64881965 | Utilizator | |
| Fișier | perechipare.cpp | Dimensiune | 377 B |
| Data încărcării | 09 Iunie 2026, 12:00 | Scor/rezultat | Eroare de compilare |
perechipare.cpp: In function ‘int main()’: perechipare.cpp:10:12: error: ‘a’ was not declared in this scope 10 | cin >> a ; | ^ perechipare.cpp:13:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 13 | if ( l%2 !=0 ); | ^~ perechipare.cpp:14:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 14 | { | ^ perechipare.cpp:17:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 17 | for ( int i=l; i<=r;i=i+2); | ^~~ perechipare.cpp:18:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 18 | { | ^ perechipare.cpp:19:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 19 | for (int j=l ; j<=r; j=j+2); | ^~~ perechipare.cpp:20:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema perechipare 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ă.