#122
CifreBinare
Se citesc două numere naturale. Să se afişeze numărul care are mai multe cifre egale cu 1
în reprezentarea în baza 2
.
Problema | CifreBinare | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51688107 | Utilizator | |
Fișier | cifrebinare.cpp | Dimensiune | 490 B |
Data încărcării | 03 August 2024, 13:36 | Scor / rezultat | 100 puncte |
cifrebinare.cpp: In function 'int main()': cifrebinare.cpp:4:9: warning: unused variable 'v' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:20: warning: unused variable 'y' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:34: warning: unused variable 'i' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:40: warning: unused variable 'nrc' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:51: warning: unused variable 'j' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:62: warning: unused variable 'aux' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:71: warning: unused variable 'max' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:83: warning: unused variable 'sum' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:102: warning: unused variable 'drmax' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:111: warning: unused variable 'stmax' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:120: warning: unused variable 'a' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:4:123: warning: unused variable 'b' [-Wunused-variable] int v[200005], y[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ cifrebinare.cpp:21:5: warning: 't' may be used uninitialized in this function [-Wmaybe-uninitialized] if(s>t){ ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | OK. | 20 | 20 | ||
3 | 0 secunde | OK. | 20 | 20 | ||
4 | 0 secunde | OK. | 20 | 20 | ||
5 | 0 secunde | OK. | 20 | 20 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifreBinare 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ă.