#2914
nthodd
Se dă numărul natural n
. Afișați al n
-lea număr impar.
Problema | nthodd | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 64 MB
/
Stivă 64 MB
|
Id soluție | #53484095 | Utilizator | |
Fișier | nthodd.cpp | Dimensiune | 5.76 KB |
Data încărcării | 02 Noiembrie 2024, 11:24 | Scor / rezultat | 40 puncte |
nthodd.cpp: In member function 'BigUint& BigUint::add(const BigUint&)': nthodd.cpp:95:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(nr.size() <= i) nr.push_back(0); ^ nthodd.cpp:96:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(i<oth.size()) nr[i] += oth[i] + r; ^ nthodd.cpp: In member function 'BigUint& BigUint::substract(const BigUint&)': nthodd.cpp:115:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(nr.size() <= i) nr.push_back(0); ^ nthodd.cpp:116:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(i<oth.size()) nr[i] -= oth[i] + r; ^ nthodd.cpp: In member function 'BigUint BigUint::smallMultiply(const llong128&)': nthodd.cpp:134:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(nr.size() <= i) nr.push_back(0); ^ nthodd.cpp: In function 'BigUint multiply(const BigUint&, const BigUint&)': nthodd.cpp:149:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0; i<a.size(); ++i) ^ nthodd.cpp:150:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j=0; j<b.size(); ++j) ^ nthodd.cpp:152:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=1; i<c.size(); ++i) ^ nthodd.cpp: In member function 'void BigUint::fromString(std::string)': nthodd.cpp:5:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] #define BIG_BASE_EXP 8 ^ nthodd.cpp:166:33: note: in expansion of macro 'BIG_BASE_EXP' for(int i=0; i<s.size()/BIG_BASE_EXP; ++i) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
Punctaj total | 40 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema nthodd 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ă.