#3497
ProgresieGeom
Se dă o progresie geometrică cu primul termen x
, cu rația egală cu \(\left[ a \over b \right] \), unde [p]
reprezintă partea întreagă a numărului real p
. Afișați al n
-lea termen.
Problema | ProgresieGeom | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 5 secunde | Limita memorie |
Total: 512 MB
/
Stivă 128 MB
|
Id soluție | #43270892 | Utilizator | |
Fișier | progresiegeom.cpp | Dimensiune | 8.20 KB |
Data încărcării | 13 Aprilie 2023, 17:59 | Scor / rezultat | 100 puncte |
progresiegeom.cpp: In function 'bool operator==(const num&, const num&)': progresiegeom.cpp:126:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i < a.val.length()) ^ progresiegeom.cpp: In member function 'num num::operator+(const num&) const': progresiegeom.cpp:168:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i < n.val.length()) ^ progresiegeom.cpp:176:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i < val.length()) ^ progresiegeom.cpp: In member function 'num num::operator-(const num&) const': progresiegeom.cpp:210:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i < aux.val.length() && i < n.val.length()) ^ progresiegeom.cpp:210:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i < aux.val.length() && i < n.val.length()) ^ progresiegeom.cpp:227:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (j + 1 == aux.val.length() && aux.val[j] == '0') ^ progresiegeom.cpp:233:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i < aux.val.length()) ^ progresiegeom.cpp: In member function 'num num::operator*(const num&) const': progresiegeom.cpp:250:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < val.length(); i++) ^ progresiegeom.cpp:251:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int j = 0; j < n.val.length(); j++) ^ progresiegeom.cpp:256:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < a.size(); i++) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0.084 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 4 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | OK. | 10 | 10 | ||
8 | 1.188 secunde | OK. | 10 | 10 | ||
9 | 1.72 secunde | OK. | 10 | 10 | ||
10 | 1.096 secunde | OK. | 10 | 10 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ProgresieGeom 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ă.