#2560
bits
Se dă un număr natural N
. Determinați valoarea unor anumiți biți din reprezentarea sa în baza 2.
Balcaniada de Informatică 2018, ziua de antrenament
Problema | bits | Operații I/O |
bits.in /bits.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 128 MB
/
Stivă 32 MB
|
Id soluție | #16523928 | Utilizator | |
Fișier | bits.cpp | Dimensiune | 348 B |
Data încărcării | 26 August 2019, 00:59 | Scor / rezultat | 70 puncte |
bits.cpp: In function 'int main()': bits.cpp:15:24: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=] scanf ("%d", &k); ^ bits.cpp:7:36: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen ("bits.in", "r", stdin); ^ bits.cpp:8:38: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen ("bits.out", "w", stdout); ^ bits.cpp:12:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf ("%llu%hi", &n, &q); ^ bits.cpp:15:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf ("%d", &k); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | OK. | 10 | 10 | ||
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 70 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema bits 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ă.