#2672
primulbit
Se citește numărul n
. Să se determine numărul de ordine al celui mai semnificativ bit.
Problema | primulbit | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #29425094 | Utilizator | |
Fișier | primulbit.cpp | Dimensiune | 164 B |
Data încărcării | 27 Aprilie 2021, 12:26 | Scor / rezultat | 0 puncte |
primulbit.cpp: In function 'int main()': primulbit.cpp:8:19: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=] scanf("%d", &n); ^ primulbit.cpp:10:33: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=] printf("%lld",(int)(log2(n))); ^ primulbit.cpp:7:18: warning: unused variable 'm' [-Wunused-variable] long long n, m; ^ primulbit.cpp:8:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema primulbit 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ă.