#939
sum00
Să se scrie un program care citeşte de la tastatura două numere naturale şi determină suma lor.
Problema | sum00 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #31472635 | Utilizator | |
Fișier | sum00.cpp | Dimensiune | 696 B |
Data încărcării | 14 Octombrie 2021, 13:07 | Scor / rezultat | 0 puncte |
sum00.cpp: In function 'int main()': sum00.cpp:16:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=0;i<a.length();i++)c=(c*256+a[i])%101,d=(d*256+b[i])%101; ^ sum00.cpp:17:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=1;i<a.length();i++)e=e*256%101; ^ sum00.cpp:18:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=a.length();i<b.length();i++) ^ sum00.cpp:21:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] {for(j=0;j<a.length();j++)if(a[j]!=b[i-a.length()+j]){j=0;break;}if(j)cout<<i-a.length()<<'\n';} ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
10 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sum00 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ă.