#1
Să se scrie un program care citeşte din fişier două numere întregi şi determină suma lor.
| Problema | sum | Operații I/O |
sum.in/sum.out
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64140551 | Utilizator | |
| Fișier | sum.cpp | Dimensiune | 988 B |
| Data încărcării | 20 Aprilie 2026, 10:05 | Scor/rezultat | 0 puncte |
sum.cpp: In function ‘int main()’: sum.cpp:11:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 11 | for (int i=0;i<strlen(s);i++) | ~^~~~~~~~~~ sum.cpp:22:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 22 | for (int i=0;i<strlen(s);i++) | ~^~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 2 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.002 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 | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.001 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 10 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sum 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ă.